Calypso Gateway v1.0

codec.adapt
Class VisitorAdapter

java.lang.Object
  |
  +--codec.adapt.CorbaTtcnAdapter
        |
        +--codec.adapt.VisitorAdapter

public final class VisitorAdapter
extends CorbaTtcnAdapter

Class performing adaptation of CORBA NVList introspection capabilities to requirements of e.g. ServerCallVisitor. Ordered collection of objects is created so that it can be directly employed by visit() methods. Resulting collection can be accessed as DynIterator.


Field Summary
private  org.omg.CORBA.DynUnion dynUnion_
           
private  boolean isUnionEncapsulated
           
static int OPTIONS_CLIENT_REPLY
          Perform adaptation for Client Reply PDU.
static int OPTIONS_SERVER_CALL
          Perform adaptation for Server Call PDU.
private  org.omg.CORBA.ORB orb
           
private  DynDependencyManager relations
           
private  java.util.Vector vector
           
 
Constructor Summary
VisitorAdapter()
           
 
Method Summary
 void create(org.omg.CORBA.NVList nvList, org.omg.CORBA.NamedValue result, int options)
          Create OpenTTCN-compatible model of structured data from input.
private  void introspect(org.omg.CORBA.NameValuePair pair)
           
private  void introspectArray(org.omg.CORBA.Any origin, org.omg.CORBA.DynArray dynArray)
          Introspect unnamed components of DynArray.
private  void introspectStruct(org.omg.CORBA.Any origin, org.omg.CORBA.DynStruct dynStruct)
          Introspect named components of DynStruct.
 DynIterator iterator()
           
 void updateContents()
          Update contents of NVList so that it points to actual data.
 void updateSequence(DynIterator dynIterator, int length)
          Update contents of iterator (internally backed by "vector") as soon as it becomes clear how many items of data "sequence" actually has.
 void updateUnion(DynIterator dynIterator, org.omg.CORBA.Any discriminator)
          Update contents of iterator (internally backed by "vector") as soon as it becomes clear which branch of "union" has been chosen.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

vector

private java.util.Vector vector

orb

private org.omg.CORBA.ORB orb

relations

private DynDependencyManager relations

isUnionEncapsulated

private boolean isUnionEncapsulated

dynUnion_

private org.omg.CORBA.DynUnion dynUnion_

OPTIONS_SERVER_CALL

public static final int OPTIONS_SERVER_CALL
Perform adaptation for Server Call PDU.

OPTIONS_CLIENT_REPLY

public static final int OPTIONS_CLIENT_REPLY
Perform adaptation for Client Reply PDU.
Constructor Detail

VisitorAdapter

public VisitorAdapter()
Method Detail

iterator

public DynIterator iterator()
Overrides:
iterator in class CorbaTtcnAdapter

introspectArray

private void introspectArray(org.omg.CORBA.Any origin,
                             org.omg.CORBA.DynArray dynArray)
Introspect unnamed components of DynArray.

introspectStruct

private void introspectStruct(org.omg.CORBA.Any origin,
                              org.omg.CORBA.DynStruct dynStruct)
Introspect named components of DynStruct.

introspect

private void introspect(org.omg.CORBA.NameValuePair pair)

create

public void create(org.omg.CORBA.NVList nvList,
                   org.omg.CORBA.NamedValue result,
                   int options)
Create OpenTTCN-compatible model of structured data from input. Parameter "result" shall be set to "null" in case "options" are set to value different from OPTIONS_CLIENT_REPLY, otherwise it shall point to the result of the operation.
Overrides:
create in class CorbaTtcnAdapter

updateUnion

public void updateUnion(DynIterator dynIterator,
                        org.omg.CORBA.Any discriminator)
Update contents of iterator (internally backed by "vector") as soon as it becomes clear which branch of "union" has been chosen.

updateSequence

public void updateSequence(DynIterator dynIterator,
                           int length)
Update contents of iterator (internally backed by "vector") as soon as it becomes clear how many items of data "sequence" actually has.

updateContents

public void updateContents()
Update contents of NVList so that it points to actual data.

Calypso Gateway v1.0