|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--fipaos.mts.MTPBase | +--fipaos.mts.InternalMTPBase | +--fipaos.mts.rmi.internal.RMIComms
This class is a Comms implementation which offers support
for RMI.
Inner Class Summary | |
class |
RMIComms.MTSListener
Class that is actually bound to the NS |
Fields inherited from class fipaos.mts.MTPBase |
_hap, _name, _ns_url, _shutdown, ACC_NAME |
Fields inherited from interface fipaos.mts.service.Service |
ACL_LANGUAGE_UNKNOWN, CONTENT_LANGUAGE_UNKNOWN, ERROR_STRING, ERROR_UNKNOWN, FIPAOS_DEBUG, FIPAOS_MSG_ID_SLOT, MALFORMED_ENVELOPE, MSG_DELIVERY_FAILURE_REASON, NONE, PROTOCOL_UNKNOWN, TARGET_UNKNOWN |
Constructor Summary | |
RMIComms(java.lang.String name,
URL ns)
Comms initialiser |
Method Summary | |
protected void |
bind()
Bind the MTP to the NS (if it exists) and perform other start-up operations |
static void |
bindToRegistry(java.lang.String name,
java.rmi.Remote r,
int port)
This method will (re)bind the given entry into the local Registry NOTE: RMIRegistry's only allow local objects to be bound to them, hence the need for an additional (lightweight) Naming-Service. |
java.util.List |
getAddresses()
Method to retreive the protocol dependant address of an object that can be used to receive messages. |
protected RMIComms.MTSListener |
getMTSListener(RMIComms parent)
Method to get an instance of MTSListener |
java.util.List |
getProtocols()
Retreives the protocols known by this comms implementation |
void |
handleMessage(Message msg)
|
protected java.lang.Object |
lookup(java.lang.String name)
Attempt to lookup a reference to the MTS belonging to the given Agent |
protected java.lang.Object |
lookup(URL name)
Lookup a reference to the MTS at the given URL |
static void |
main(java.lang.String[] args)
Test harness for transport |
protected void |
send(java.lang.Object target,
Message msg)
Invoked to send the given Message to the given target |
void |
shutdown()
This should be invoked when the transport should be safely shutdown |
static void |
startupRegistry(int port)
This method will create a new Registry locally if there isn't already one running |
protected void |
unbind()
Un-bind the MTP to the NS (if it exists) |
Methods inherited from class fipaos.mts.InternalMTPBase |
handleIncoming, incoming, initialise, outgoing |
Methods inherited from class fipaos.mts.MTPBase |
handleIncoming, handleOutgoing, shutdownMTPBase |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RMIComms(java.lang.String name, URL ns) throws InitialisationException, java.rmi.RemoteException
our_name
- The name to use when binding to the transport layers
naming service - should include HAP address, i.e. "agentA@hap"Method Detail |
protected void bind() throws InitialisationException
bind
in class MTPBase
protected void unbind()
unbind
in class MTPBase
protected java.lang.Object lookup(URL name) throws UnknownTargetException
lookup
in class MTPBase
protected java.lang.Object lookup(java.lang.String name) throws UnknownTargetException
lookup
in class MTPBase
protected void send(java.lang.Object target, Message msg) throws UnableToSendException
send
in class InternalMTPBase
public java.util.List getAddresses()
getAddresses
in class InternalMTPBase
public java.util.List getProtocols()
getProtocols
in class InternalMTPBase
public void shutdown()
shutdown
in class InternalMTPBase
public void handleMessage(Message msg)
public static void startupRegistry(int port) throws InitialisationException
public static void bindToRegistry(java.lang.String name, java.rmi.Remote r, int port) throws InitialisationException
name
- Name to bind the object into the Registry usingr
- The Remote object reference to bindprotected RMIComms.MTSListener getMTSListener(RMIComms parent) throws java.rmi.RemoteException
public static void main(java.lang.String[] args) throws java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |