|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Abstract interface for Message Transport Protocols
| Inner Class Summary | |
static interface |
MTP.Dispatcher
Callback interface to be notified of message arrivals over this Message Transport Protocol. |
static interface |
MTP.MTPException
Generic exception class for MTP errors. |
| Method Summary | |
TransportAddress |
activate(MTP.Dispatcher disp)
Activates an MTP handler for incoming messages on a default address. |
void |
activate(MTP.Dispatcher disp,
TransportAddress ta)
Activates an MTP handler for incoming messages on a specific address. |
java.lang.String |
addrToStr(TransportAddress ta)
Converts a TransportAddress object into a string
representation. |
void |
deactivate()
Deactivates all the MTP handlers. |
void |
deactivate(TransportAddress ta)
Deactivates the MTP handler listening at a given transport address. |
void |
deliver(TransportAddress ta,
Envelope env,
byte[] payload)
Delivers to the specified address an ACL message, encoded in some concrete message representation, using the given envelope as a transmission header. |
java.lang.String |
getName()
Reads the name of the message transport protocol managed by this MTP. |
TransportAddress |
strToAddr(java.lang.String rep)
Converts a string representing a valid address in this MTP to a TransportAddress object. |
| Method Detail |
public TransportAddress activate(MTP.Dispatcher disp)
throws MTP.MTPException
TransportAddress, corresponding to the
chosen default address.
public void activate(MTP.Dispatcher disp,
TransportAddress ta)
throws MTP.MTPException
ta - A TransportAddress object, representing
the transport address to listen to.
public void deactivate(TransportAddress ta)
throws MTP.MTPException
ta - The TransportAddress object the handle to
close is listening to.
public void deactivate()
throws MTP.MTPException
public void deliver(TransportAddress ta,
Envelope env,
byte[] payload)
throws MTP.MTPException
ta - The transport address to deliver the message to. It
must be a valid address for this MTP.env - The message envelope, containing various fields
related to message recipients, encoding, and timestamping.
public TransportAddress strToAddr(java.lang.String rep)
throws MTP.MTPException
TransportAddress object.rep - The string representation of the address.TransportAddress object, created from the
given string.
public java.lang.String addrToStr(TransportAddress ta)
throws MTP.MTPException
TransportAddress object into a string
representation.ta - The TransportAddress object.TransportAddress is not a valid address for this
MTP.public java.lang.String getName()
"fipa.mts.mtp".
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||