org.openorb.orb.csiv2
Class CSITlsSecTrans

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

public final class CSITlsSecTrans
extends java.lang.Object

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

Author:
Michael Rumpf

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

Method Detail

create

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

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

create

public static CSITlsSecTrans create(org.omg.IOP.Codec codec,
                                    byte[] data)
This method just wraps this class around an instance of type TLS_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 TLS_SEC_TRANS.
Returns:
An instance of this convenience wrapper with a member of type TLS_SEC_TRANS or null in case the decoding of the data failed.

create

public static CSITlsSecTrans create(org.omg.IOP.Codec codec,
                                    short target_supports,
                                    short target_requires,
                                    TransportAddress[] addresses)
This method creates a TLS_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.
addresses - The list of hostnames and ports.
Returns:
An instance of this convenience wrapper with a member of type TLS_SEC_TRANS.

getInternal

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

Returns:
The internal member of type TLS_SEC_TRANS.

getEncoded

public byte[] getEncoded(org.omg.CORBA.ORB orb)
Return the TLS_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 TLS_SEC_TRANS.target_supports member or -1 if the TLS_SEC_TRANS member of this class is not set.

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

getTargetSupportsString

public java.lang.String getTargetSupportsString()
Returns a textual representation of the TLS_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 TLS_SEC_TRANS member of this class has not been set.

getTargetRequires

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

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

getTargetRequiresString

public java.lang.String getTargetRequiresString()
Returns a textual representation of the TLS_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 TLS_SEC_TRANS member of this class has not been set.

getTransportAddressCount

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

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

getTransportAddress

public TransportAddress getTransportAddress(int index)
Return an item of the TLS_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 TLS_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 TLS_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 TLS_SEC_TRANS member of this class has not been set.

getTransportAddressPort

public int getTransportAddressPort(int index)
Return the port of an item of the TLS_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 TLS_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 TLS_SEC_TRANS.

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