|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--fipaos.mts.IOR
The IOR class is used to model a CORBA IOR. It allows the retrieval and
storage of the component parts of an IOR and the construction and parsing
of 'stringified' IORs that can be used in the stringToObject
methods of an ORB.
Field Summary | |
static java.lang.String |
TAG_GIOP
|
static java.lang.String |
TAG_IIOP
|
Constructor Summary | |
IOR(java.lang.String hex_ior)
Constructs an IOR object from a stringified IOR. |
|
IOR(java.lang.String IDL,
java.util.List hosts,
java.util.List ports,
java.util.List object_keys)
Constructs an IOR object with multiple profiles using the information specified. |
|
IOR(java.lang.String IDL,
java.lang.String host,
int port,
java.lang.String object_key)
Constructs an IOR object using the information specified. |
Method Summary | |
int |
addProfile(java.lang.String host,
int port,
java.lang.String object_key)
Adds a new profile to the IOR containing the specified information. |
java.lang.String |
getHost()
Returns the host name of the current profile of the IOR. |
java.lang.String |
getHost(int profile)
Returns the host name of the indicated profile of the IOR. |
java.lang.String |
getIDL()
Returns the IDL currently in use by this IOR. |
java.lang.String |
getObjectKey()
Returns the object key of the current profile of the IOR. |
java.lang.String |
getObjectKey(int profile)
Returns the object key of the indicated profile of the IOR. |
int |
getPort()
Returns the port number of the current profile of the IOR. |
int |
getPort(int profile)
Returns the port of the indicated profile of the IOR. |
int |
getProfileCount()
Returns the number of profiles currently in the IOR. |
java.lang.String |
getTag()
Returns the profile type tag of the current profile of the IOR. |
java.lang.String |
getTag(int profile)
Returns the profile type tag of the indicated profile of the IOR. |
int |
insertProfile(int profile,
java.lang.String host,
int port,
java.lang.String object_key)
Inserts a new profile to the IOR containing the specified information into the specified profile position. |
boolean |
isBigEndian()
Indicates whether this IOR is encoded in a big or little endian way. |
void |
isBigEndian(boolean endian)
Sets the endianness of this IOR. |
static void |
main(java.lang.String[] args)
When run from the command line this class will load an IOR from the file specified as an argument, parse it and echo the results back to STDOUT. |
int |
removeProfile(int profile)
Removes the specified profile from the IOR. |
void |
setHost(int profile,
java.lang.String host)
Sets the host name for the indicated profile of the IOR. |
void |
setHost(java.lang.String host)
Sets the host name for the current profile of the IOR. |
void |
setIDL(java.lang.String idl)
Sets the IDL to use for this IOR. |
void |
setObjectKey(int profile,
java.lang.String obj_key)
Sets the object key for the indicated profile of the IOR. |
void |
setObjectKey(java.lang.String obj_key)
Sets the object key for the current profile of the IOR. |
void |
setPort(int port)
Sets the port for the current profile of the IOR. |
void |
setPort(int profile,
int port)
Sets the port for the indicated profile of the IOR. |
void |
setTag(int profile,
java.lang.String tag)
Sets the profile type tag for the indicated profile of the IOR. |
void |
setTag(java.lang.String tag)
Sets the profile type tag for the current profile of the IOR. |
java.lang.String |
toString()
Converts the IOR object to a hexadecimal CDR 'stringified' representation, suitable for transmission to other ORBs. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String TAG_IIOP
public static final java.lang.String TAG_GIOP
Constructor Detail |
public IOR(java.lang.String hex_ior)
objectToString()
method. They are large
strings of hexadecimal characters and begin with 'IOR:'.A
- hexadecimal string representing a stringified IOR.public IOR(java.lang.String IDL, java.lang.String host, int port, java.lang.String object_key)
IDL
- The IDL that is to be used for the IOR. This will be a
string name, for example: 'IDL:FIPA_Agent_97'host
- The host name or IP address of the machine that this IOR represents
e.g. host.domain.comport
- The port of the target machineobject_key
- The object key section of the actual IOR of the target object.
Object keys are ORB specific so this must be supplied by retrieving it
from the ORB used to create the original IOR. It can be retrieved either
by method call on the ORB, or by parsing a stringified IOR.public IOR(java.lang.String IDL, java.util.List hosts, java.util.List ports, java.util.List object_keys)
IDL
- The IDL that is to be used for the IOR. This will be a
string name, for example: 'IDL:FIPA_Agent_97'hosts
- A list of host names or IP address of the machine that this IOR represents
e.g. host.domain.comport
- A list of ports of the target machineobject_key
- A list of object key sections of the actual IOR of the target object.
Object keys are ORB specific so this must be supplied by retrieving it
from the ORB used to create the original IOR. It can be retrieved either
by method call on the ORB, or by parsing a stringified IOR.Method Detail |
public java.lang.String getIDL()
public void setIDL(java.lang.String idl)
toString
method of this IOR is called, the hex
output will have been modified to list the new IDL name. This IDL will be the same
for all profiles in the IOR.idl
- The IDL to use for this IORpublic boolean isBigEndian()
public void isBigEndian(boolean endian)
The
- endianness flag- true is big endian, false is little endianpublic void setHost(java.lang.String host)
toString
method of this IOR is called then the hex output will be modified to show the new
host name.host
- The host name (or IP address) to set in the IORpublic void setHost(int profile, java.lang.String host)
toString
method of this IOR is called then the hex output will be modified to show the new
host name.profile
- The index number of the profile to modify in this IORhost
- The host name (or IP address) to set in the IORpublic java.lang.String getHost()
public java.lang.String getHost(int profile)
profile
- The index number of the profile to accesspublic void setPort(int port)
toString
method of this IOR is called then the hex output will be modified to show the new
port.port
- The port number to set in the IORpublic void setPort(int profile, int port)
toString
method of this IOR is called then the hex output will be modified to show the new
port.profile
- The index number of the profile to modify in this IORport
- The port to set in the IORpublic int getPort()
public int getPort(int profile)
profile
- The index number of the profile to accesspublic void setObjectKey(java.lang.String obj_key)
toString
method of this IOR is called then the hex output will be modified to show the new
object key.obj_key
- The object key to set in the IORpublic void setObjectKey(int profile, java.lang.String obj_key)
toString
method of this IOR is called then the hex output will be modified to show the new
object key.profile
- The index number of the profile to modify in this IORobj_key
- The object key to set in the IORpublic java.lang.String getObjectKey()
public java.lang.String getObjectKey(int profile)
profile
- The index number of the profile to accesspublic void setTag(java.lang.String tag)
toString
method of this IOR is called then the hex output will be modified to show the new
profile type tag.tag
- The profile type tag to set in the IORpublic void setTag(int profile, java.lang.String tag)
toString
method of this IOR is called then the hex output will be modified to show the new
profile type tag.profile
- The index number of the profile to modify in this IORtag
- The profile type tag to set in the IORpublic java.lang.String getTag()
public java.lang.String getTag(int profile)
profile
- The index number of the profile to accesspublic int addProfile(java.lang.String host, int port, java.lang.String object_key)
host
- The host name or IP address to use in this profileport
- The port number to use in this profileobject_key
- The object key to use in this profilepublic int insertProfile(int profile, java.lang.String host, int port, java.lang.String object_key)
profile
- The index number at which to insert this profilehost
- The host name or IP address to use in this profileport
- The port number to use in this profileobject_key
- The object key to use in this profilepublic int removeProfile(int profile)
profile
- The index number of the profile to removepublic int getProfileCount()
public java.lang.String toString()
stringToObject
methods of ORBs in order to invoke
remote method calls on the object represented by this IOR.toString
in class java.lang.Object
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |