org.openorb.orb.csiv2
Class CSISeciopSecTrans

java.lang.Object
  extended by org.openorb.orb.csiv2.CSISeciopSecTrans

public final class CSISeciopSecTrans
extends java.lang.Object

This is a convenience wrapper around the SECIOP_SEC_TRANS class. It provides helper methods to retrieve all data from the SECIOP_SEC_TRANS class in an easy way.

Author:
Michael Rumpf

Method Summary
static CSISeciopSecTrans create(org.omg.IOP.Codec codec, byte[] data)
          This method just wraps this class around an instance of type SECIOP_SEC_TRANS that is decoded from the specified byte array.
static CSISeciopSecTrans create(org.omg.IOP.Codec codec, SECIOP_SEC_TRANS sst)
          This method just wraps this class around the specified instance of type SECIOP_SEC_TRANS.
static CSISeciopSecTrans create(org.omg.IOP.Codec codec, short target_supports, short target_requires, java.lang.String mech_oid, java.lang.String target_name, TransportAddress[] addresses)
          This method creates a SECIOP_SEC_TRANS struct.
 byte[] getEncoded(org.omg.CORBA.ORB orb)
          Return the SECIOP_SEC_TRANS instance embedded into an Any and GIOP encoded as byte array.
 SECIOP_SEC_TRANS getInternal()
          Return the internal member which this class wraps.
 byte[] getMechOid()
          Return the SECIOP_SEC_TRANS.mech_oid member as byte array.
 java.lang.String getMechOidString()
          Return the stringified mechanism oid.
 byte[] getTargetName()
          Return the SECIOP_SEC_TRANS.target_name member as gss name token.
 java.lang.String getTargetNameString()
          Return the actual name from the gss name token.
 short getTargetRequires()
          Return the bit field of the SECIOP_SEC_TRANS.target_requires member or -1 if the SECIOP_SEC_TRANS member of this class is not set.
 java.lang.String getTargetRequiresString()
          Returns a textual representation of the SECIOP_SEC_TRANS.target_requires bit field.
 short getTargetSupports()
          Return the bit field of the SECIOP_SEC_TRANS.target_supports member or -1 if the SECIOP_SEC_TRANS member of this class is not set.
 java.lang.String getTargetSupportsString()
          Returns a textual representation of the SECIOP_SEC_TRANS.target_supports bit field.
 TransportAddress getTransportAddress(int index)
          Return an item of the SECIOP_SEC_TRANS.addresses sequence.
 int getTransportAddressCount()
          Return the number of addresses provided by the SECIOP_SEC_TRANS.addresses field.
 java.lang.String getTransportAddressHostName(int index)
          Return the host name of an item of the SECIOP_SEC_TRANS.addresses sequence.
 int getTransportAddressPort(int index)
          Return the port of an item of the SECIOP_SEC_TRANS.addresses sequence.
 java.lang.String toString()
          This method creates a stringified representation of the class SECIOP_SEC_TRANS.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

create

public static CSISeciopSecTrans create(org.omg.IOP.Codec codec,
                                       SECIOP_SEC_TRANS sst)
This method just wraps this class around the specified instance of type SECIOP_SEC_TRANS.

Parameters:
codec - The codec to be used for GIOP encoding and decoding.
sst - The instance of type SECIOP_SEC_TRANS this class is a wrapper for.
Returns:
An instance of this convenience wrapper with a member of type SECIOP_SEC_TRANS.

create

public static CSISeciopSecTrans create(org.omg.IOP.Codec codec,
                                       byte[] data)
This method just wraps this class around an instance of type SECIOP_SEC_TRANS that is decoded from the specified byte array.

Parameters:
codec - The codec to be used for GIOP encoding and decoding.
data - The byte array containing a encoded instance of type SECIOP_SEC_TRANS.
Returns:
An instance of this convenience wrapper with a member of type SECIOP_SEC_TRANS or null in case the decoding of the data failed.

create

public static CSISeciopSecTrans create(org.omg.IOP.Codec codec,
                                       short target_supports,
                                       short target_requires,
                                       java.lang.String mech_oid,
                                       java.lang.String target_name,
                                       TransportAddress[] addresses)
This method creates a SECIOP_SEC_TRANS struct.

Parameters:
codec - The codec used for GIOP encoding and decoding.
target_supports - The association options the target supports.
target_requires - The association options the target requires.
mech_oid - The mechanism oid.
target_name - The authentication domain of the target.
addresses - The list of hostnames and ports.
Returns:
An instance of this convenience wrapper with a member of type SECIOP_SEC_TRANS or null in case the encoding of the OID failed.

getInternal

public SECIOP_SEC_TRANS getInternal()
Return the internal member which this class wraps.

Returns:
The internal member of type SECIOP_SEC_TRANS.

getEncoded

public byte[] getEncoded(org.omg.CORBA.ORB orb)
Return the SECIOP_SEC_TRANS instance embedded into an Any and GIOP encoded as byte array.

Returns:
A byte array containing an encoded instance of type Any or null in case the wrapped member has not been set.

getTargetSupports

public short getTargetSupports()
Return the bit field of the SECIOP_SEC_TRANS.target_supports member or -1 if the SECIOP_SEC_TRANS member of this class is not set.

Returns:
The SECIOP_SEC_TRANS.target_supports bit field or -1 when the SECIOP_SEC_TRANS member of this class has not been set.

getTargetSupportsString

public java.lang.String getTargetSupportsString()
Returns a textual representation of the SECIOP_SEC_TRANS.target_supports bit field. This method simply concatenates the names of the bits by a comma.

Returns:
A string with concatenated bit names or null when the SECIOP_SEC_TRANS member of this class has not been set.

getTargetRequires

public short getTargetRequires()
Return the bit field of the SECIOP_SEC_TRANS.target_requires member or -1 if the SECIOP_SEC_TRANS member of this class is not set.

Returns:
The SECIOP_SEC_TRANS.target_requires bit field or -1 when the SECIOP_SEC_TRANS member of this class has not been set.

getTargetRequiresString

public java.lang.String getTargetRequiresString()
Returns a textual representation of the SECIOP_SEC_TRANS.target_requires bit field. This method simply concatenates the names of the bits by a comma.

Returns:
A string with concatenated bit names or null when the SECIOP_SEC_TRANS member of this class has not been set.

getMechOid

public byte[] getMechOid()
Return the SECIOP_SEC_TRANS.mech_oid member as byte array.

Returns:
The byte array of the SECIOP_SEC_TRANS.mech_oid member or null when the SECIOP_SEC_TRANS member of this class has not been set.

getMechOidString

public java.lang.String getMechOidString()
Return the stringified mechanism oid.

Returns:
The stringified oid from the SECIOP_SEC_TRANS.mech_oid member or null when the SECIOP_SEC_TRANS member of this class has not been set.

getTargetName

public byte[] getTargetName()
Return the SECIOP_SEC_TRANS.target_name member as gss name token.

Returns:
The byte array of the gss name token SECIOP_SEC_TRANS.target_name or null when the SECIOP_SEC_TRANS member of this class has not been set.

getTargetNameString

public java.lang.String getTargetNameString()
Return the actual name from the gss name token.

Returns:
The decoded name from the gss name token SECIOP_SEC_TRANS.target_name or null when the SECIOP_SEC_TRANS member of this class has not been set.

getTransportAddressCount

public int getTransportAddressCount()
Return the number of addresses provided by the SECIOP_SEC_TRANS.addresses field.

Returns:
The number of addresses or -1 when the SECIOP_SEC_TRANS member of this class has not been set.

getTransportAddress

public TransportAddress getTransportAddress(int index)
Return an item of the SECIOP_SEC_TRANS.addresses sequence.

Parameters:
index - The index of the item to return.
Returns:
An instance of the class TransportAddress or null when the array index is out of bounds or the SECIOP_SEC_TRANS member of this class has not been set.

getTransportAddressHostName

public java.lang.String getTransportAddressHostName(int index)
Return the host name of an item of the SECIOP_SEC_TRANS.addresses sequence.

Parameters:
index - The index of the item from which to return the name.
Returns:
The content of the TransportAddress.host_name member of the item specified by the index or null when the array index is out of bounds or the SECIOP_SEC_TRANS member of this class has not been set.

getTransportAddressPort

public int getTransportAddressPort(int index)
Return the port of an item of the SECIOP_SEC_TRANS.addresses sequence.

Parameters:
index - The index of the item from which to return the port.
Returns:
The content of the TransportAddress.port member of the item specified by the index or -1 when the array index is out of bounds or the SECIOP_SEC_TRANS member of this class has not been set.

toString

public java.lang.String toString()
This method creates a stringified representation of the class SECIOP_SEC_TRANS.

Overrides:
toString in class java.lang.Object
Returns:
A string containing the information, provided by the class SECIOP_SEC_TRANS.