org.openorb.net
Interface Address

All Known Implementing Classes:
AbstractAddress

public interface Address

General address for a binding target. An address is initialized from an IOR profile and has associated policies and compoenents. Addresses must override equals and hashCode to allow comparisons between different address types to work.

Version:
$Revision: 1.5 $ $Date: 2002/06/28 08:59:05 $
Author:
Chris Wood

Field Summary
static short MASK_ADDRESS_PRIORITY
          Only the lowest 12 bits are available for the addresses priority.
 
Method Summary
 Transport createTransport()
          Use the transport constructor to construct a new transport.
 java.lang.Object get_component_data(int idx)
          Returns the data associated with a particular component, or null if the component at that index has no associated data.
 TaggedComponent get_component(int idx)
          Get the component at the specified index in the get_components array.
 TaggedComponent[] get_components()
          Returns any components associated with this address.
 TaggedComponent[] get_components(int tag)
          Returns any components with the specified tag.
 int get_profile_components()
          Returns the number of components associated only with the profile which created this address.
 Policy[] get_target_policies(int[] ts)
          Returns a PolicyList containing the requested PolicyTypes set for the address.
 java.lang.String getEndpointDescription()
          Human readable string describing the endpoint.
 java.lang.String getEndpointString()
          A string which could be used to contact the endpoint in a corbaloc style address.
 java.lang.String getObjectKeyDescription()
          Human readable string describing the object key.
 java.lang.String getObjectKeyString()
          A string which contains an RFC2396 encoding of the object key, as could be included in a corbaloc style address.
 short getPriority()
          Get the addresses priority.
 short getPriority(short mask)
          Get the addresses priority.
 java.lang.String getProtocol()
          The protocol string as would appear in the corbaloc address.
 TargetAddress getTargetAddress(short adressingDisposition)
          Get target address with specified addressing disposition.
 void set_component_data(int idx, java.lang.Object obj)
          Set the data associated with a particular component, or null if the component at that index has no associated data.
 void setPriority(short priority)
          Set the address priority.
 short setPriority(short priority, short mask)
          Set the address priority.
 void setTransportConstructor(java.lang.reflect.Constructor ctor, java.lang.Object[] args)
          Set the transport constructor for the address.
 

Field Detail

MASK_ADDRESS_PRIORITY

public static final short MASK_ADDRESS_PRIORITY
Only the lowest 12 bits are available for the addresses priority.
Method Detail

getTargetAddress

public TargetAddress getTargetAddress(short adressingDisposition)
Get target address with specified addressing disposition.

get_target_policies

public Policy[] get_target_policies(int[] ts)
Returns a PolicyList containing the requested PolicyTypes set for the address. If the specified sequence is empty, all Policys set for the address will be returned. If none of the requested PolicyTypes are overridden at the target, an empty sequence is returned.

get_components

public TaggedComponent[] get_components()
Returns any components associated with this address. Should return an empty array if there are no components available.

get_components

public TaggedComponent[] get_components(int tag)
Returns any components with the specified tag. Should return an empty array if there are no components of that type.

get_profile_components

public int get_profile_components()
Returns the number of components associated only with the profile which created this address. Components past this index in the array returned from get_components are sourced from a multi-component profile.

get_component

public TaggedComponent get_component(int idx)
Get the component at the specified index in the get_components array.
Throws:
java.lang.IndexOutOfBoundsException - if the index is out of bounds.

get_component_data

public java.lang.Object get_component_data(int idx)
Returns the data associated with a particular component, or null if the component at that index has no associated data.
Throws:
java.lang.IndexOutOfBoundsException - if the index is out of bounds.

set_component_data

public void set_component_data(int idx,
                               java.lang.Object obj)
Set the data associated with a particular component, or null if the component at that index has no associated data.
Throws:
java.lang.IndexOutOfBoundsException - if the index is out of bounds.

setTransportConstructor

public void setTransportConstructor(java.lang.reflect.Constructor ctor,
                                    java.lang.Object[] args)
Set the transport constructor for the address.

createTransport

public Transport createTransport()
Use the transport constructor to construct a new transport.

getPriority

public short getPriority()
Get the addresses priority. This will be the low order word of the binding priority.

getPriority

public short getPriority(short mask)
Get the addresses priority. This will be the low order word of the binding priority.
Parameters:
mask - mask of bits to get

setPriority

public void setPriority(short priority)
Set the address priority. This will be the low order word of the binding priority.

setPriority

public short setPriority(short priority,
                         short mask)
Set the address priority. This will be the low order word of the binding priority.

getProtocol

public java.lang.String getProtocol()
The protocol string as would appear in the corbaloc address.

getEndpointString

public java.lang.String getEndpointString()
A string which could be used to contact the endpoint in a corbaloc style address.

getEndpointDescription

public java.lang.String getEndpointDescription()
Human readable string describing the endpoint.

getObjectKeyString

public java.lang.String getObjectKeyString()
A string which contains an RFC2396 encoding of the object key, as could be included in a corbaloc style address.

getObjectKeyDescription

public java.lang.String getObjectKeyDescription()
Human readable string describing the object key.