org.jacorb.orb.iiop
Class IIOPProfile

java.lang.Object
  extended byorg.omg.CORBA.LocalObject
      extended byorg.omg.ETF._ProfileLocalBase
          extended byorg.jacorb.orb.etf.ProfileBase
              extended byorg.jacorb.orb.iiop.IIOPProfile
All Implemented Interfaces:
java.lang.Cloneable, org.apache.avalon.framework.configuration.Configurable, IDLEntity, LocalInterface, Object, Profile, ProfileOperations, java.io.Serializable

public class IIOPProfile
extends ProfileBase

Version:
$Id: IIOPProfile.java,v 1.19 2006/03/18 17:10:20 andre.spiegel Exp $
Author:
Andre Spiegel
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.jacorb.orb.etf.ProfileBase
components, configuration, corbalocStr, objectKey, version
 
Constructor Summary
IIOPProfile()
           
IIOPProfile(byte[] data)
           
IIOPProfile(IIOPAddress address, byte[] objectKey)
           
IIOPProfile(IIOPAddress address, byte[] objectKey, int minor)
           
IIOPProfile(java.lang.String corbaloc)
          Constructs an IIOPProfile from a corbaloc URL.
 
Method Summary
 java.lang.Object clone()
           
 void configure(org.apache.avalon.framework.configuration.Configuration configuration)
           
 boolean equals(java.lang.Object other)
           
 ProtocolAddressBase getAddress()
           
 java.util.List getAlternateAddresses()
           
 SSL getSSL()
           
 int getSSLPort()
          Returns the port on which SSL is available according to this profile, or -1 if SSL is not supported.
 int getTLSPortFromCSIComponent()
          If there is a component tagged with TAG_CSI_SEC_MECH_LIST, get the SSL port from this component.
 int hash()
          To improve the management of a large set of profile instances, the author may provide a hash function using the data in a Profile instance.
 int hashCode()
           
 boolean is_match(Profile prof)
          This function shall determine if the passed profile, prof, is a match to this profile.
 void patchPrimaryAddress(ProtocolAddressBase replacement)
          Replaces the host in this profile's primary address with newHost (if it is not null), and the port with newPort (if it is not -1).
 void readAddressProfile(CDRInputStream addressProfileStream)
          Reads the bytes that make up the ETF::AddressProfile bytes (new spec) from a stream.
 int tag()
          ETF defined read-only accessor for the GIOP tag.
 IIOPProfile to_GIOP_1_0()
          Returns a copy of this profile that is compatible with GIOP 1.0.
 java.lang.String toString()
           
 void writeAddressProfile(CDROutputStream addressProfileStream)
          Writes the bytes that would make up the ETF::AddressProfile bytes (new spec) to a stream.
 
Methods inherited from class org.jacorb.orb.etf.ProfileBase
addComponent, addComponent, asTaggedProfile, copy, demarshal, encapsulation, get_object_key, getComponent, getComponents, initFromProfileData, marshal, set_object_key, version
 
Methods inherited from class org.omg.ETF._ProfileLocalBase
_ids
 
Methods inherited from class org.omg.CORBA.LocalObject
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_interface, _get_policy, _hash, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_policy_override, validate_connection
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.omg.CORBA.Object
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_interface, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
 

Constructor Detail

IIOPProfile

public IIOPProfile()

IIOPProfile

public IIOPProfile(byte[] data)

IIOPProfile

public IIOPProfile(IIOPAddress address,
                   byte[] objectKey)

IIOPProfile

public IIOPProfile(IIOPAddress address,
                   byte[] objectKey,
                   int minor)

IIOPProfile

public IIOPProfile(java.lang.String corbaloc)
Constructs an IIOPProfile from a corbaloc URL. Only to be used from the corbaloc parser.

Method Detail

configure

public void configure(org.apache.avalon.framework.configuration.Configuration configuration)
               throws org.apache.avalon.framework.configuration.ConfigurationException
Throws:
org.apache.avalon.framework.configuration.ConfigurationException

writeAddressProfile

public void writeAddressProfile(CDROutputStream addressProfileStream)
Writes the bytes that would make up the ETF::AddressProfile bytes (new spec) to a stream.

Writes GIOP version, host string, and port.

Specified by:
writeAddressProfile in class ProfileBase

readAddressProfile

public void readAddressProfile(CDRInputStream addressProfileStream)
Reads the bytes that make up the ETF::AddressProfile bytes (new spec) from a stream.

Writes GIOP version, host string, and port.

Specified by:
readAddressProfile in class ProfileBase

hash

public int hash()
To improve the management of a large set of profile instances, the author may provide a hash function using the data in a Profile instance. The Profile shall always implement this function and either return a hash number, or 0 (zero) if no hashing is supported.


clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Throws:
java.lang.CloneNotSupportedException

is_match

public boolean is_match(Profile prof)
This function shall determine if the passed profile, prof, is a match to this profile. The specifics of the match are left to the details of the underlying transport, however profiles shall be considered a match, if they would create connections that share the same attributes relevant to the transport setup. Among others, this could include address information (eg. host address) and transport layer characteristics (eg. encryption levels). If a match is found, it shall return true, or false otherwise.


tag

public int tag()
Description copied from class: ProfileBase
ETF defined read-only accessor for the GIOP tag.

Specified by:
tag in interface ProfileOperations
Specified by:
tag in class ProfileBase

getAddress

public ProtocolAddressBase getAddress()

patchPrimaryAddress

public void patchPrimaryAddress(ProtocolAddressBase replacement)
Replaces the host in this profile's primary address with newHost (if it is not null), and the port with newPort (if it is not -1).

Overrides:
patchPrimaryAddress in class ProfileBase

getAlternateAddresses

public java.util.List getAlternateAddresses()

getSSL

public SSL getSSL()

getTLSPortFromCSIComponent

public int getTLSPortFromCSIComponent()
If there is a component tagged with TAG_CSI_SEC_MECH_LIST, get the SSL port from this component. Return the SSL port in the TAG_TLS_SEC_TRANS component encapsulated into the transport_mech field of the first CompoundSecMech of the CSI_SEC_MECH_LIST. Return -1 if there is no component tagged with TAG_CSI_SEC_MECH_LIST or if this component specifies no SSL port.


getSSLPort

public int getSSLPort()
Returns the port on which SSL is available according to this profile, or -1 if SSL is not supported.


to_GIOP_1_0

public IIOPProfile to_GIOP_1_0()
Returns a copy of this profile that is compatible with GIOP 1.0.


equals

public boolean equals(java.lang.Object other)

hashCode

public int hashCode()

toString

public java.lang.String toString()