fipaos.mts
Class MTPBase

Direct Known Subclasses:
ExternalMTPBase, InternalMTPBase

public abstract class MTPBase

Contains the abstract functionality that all MTP's require in order to deal with messages - increases code-reuse in MTP implementations

$Revision: 1.8 $ $Date: 2001/03/09 21:45:14 $ $Author: alantreadway $


Field Summary
 boolean_shutdown
          Indicates if this MTP has been shutdown
 static StringACC_NAME
          Default name that the ACC binds to the NS using

Method Summary
 abstract java.util.ListgetProtocols()
          Retreives the protocols known by this comms implementation
 static voidmain(String[] args)
           
 (package private) abstract voidreceive(Envelope envelope, Object msg)
          Invoked when a message is received - subclasses should implement this to deal with incoming messages (i.e.
 (package private) abstract voidsend(Object target, Envelope envelope, Object msg)
          Send the given message to the given target - the target is the result of a call to one of the lookup() methods

Field Detail

_shutdown

public boolean _shutdown
Indicates if this MTP has been shutdown

ACC_NAME

public static String ACC_NAME
Default name that the ACC binds to the NS using
Method Detail

getProtocols

public abstract java.util.List getProtocols()
Retreives the protocols known by this comms implementation
Returns: A List of String's

main

public static void main(String[] args)
throws java.lang.Throwable

receive

abstract void receive(Envelope envelope, Object msg)
Invoked when a message is received - subclasses should implement this to deal with incoming messages (i.e. propogate back up the comms stack)

send

abstract void send(Object target, Envelope envelope, Object msg)
throws UnknownTargetException,
UnknownProtocolException,
UnableToSendException
Send the given message to the given target - the target is the result of a call to one of the lookup() methods

Association Links

to Class java.lang.String

Default name that the ACC binds to the NS using

to Class fipaos.util.URL

URL of this MTP's naming service

to Class java.lang.String

Reference to our name

to Class java.lang.String

HAP address for the platform we're registered with

to Class fipaos.util.Queue

Incoming queue for messages

to Class fipaos.util.Monitor

Monitor for incoming messages