Package jade.mtp.iiop

Class MessageTransportProtocol

  • All Implemented Interfaces:
    InChannel, MTP, OutChannel

    public class MessageTransportProtocol
    extends Object
    implements MTP
    Implementation of fipa.mts.mtp.iiop.std specification for delivering ACL messages over the OMG IIOP transport protocol.
    Version:
    $Date$ $Revision$
    Author:
    Giovanni Rimassa - Universita' di Parma
    • Constructor Detail

      • MessageTransportProtocol

        public MessageTransportProtocol()
    • Method Detail

      • deactivate

        public void deactivate​(TransportAddress ta)
                        throws MTPException
        Description copied from interface: InChannel
        Deactivates the MTP handler listening at a given transport address.
        Specified by:
        deactivate in interface InChannel
        Parameters:
        ta - The TransportAddress object the handle to close is listening to.
        Throws:
        MTPException - Thrown if some MTP cleanup error occurs.
      • deliver

        public void deliver​(String addr,
                            Envelope env,
                            byte[] payload)
                     throws MTPException
        Description copied from interface: OutChannel
        Delivers to the specified address an ACL message, encoded in some concrete message representation, using the given envelope as a transmission header.
        Specified by:
        deliver in interface OutChannel
        env - The message envelope, containing various fields related to message recipients, encoding, and timestamping.
        Throws:
        MTPException - Thrown if some MTP delivery error occurs.
      • strToAddr

        public TransportAddress strToAddr​(String rep)
                                   throws MTPException
        Description copied from interface: MTP
        Converts a string representing a valid address in this MTP to a TransportAddress object.
        Specified by:
        strToAddr in interface MTP
        Parameters:
        rep - The string representation of the address.
        Returns:
        A TransportAddress object, created from the given string.
        Throws:
        MTPException - If the given string is not a valid address according to this MTP.
      • addrToStr

        public String addrToStr​(TransportAddress ta)
                         throws MTPException
        Description copied from interface: MTP
        Converts a TransportAddress object into a string representation.
        Specified by:
        addrToStr in interface MTP
        Parameters:
        ta - The TransportAddress object.
        Returns:
        A string representing the given address.
        Throws:
        MTPException - If the given TransportAddress is not a valid address for this MTP.
      • getName

        public String getName()
        Description copied from interface: MTP
        Reads the name of the message transport protocol managed by this MTP. The FIPA standard message transport protocols have a name starting with "fipa.mts.mtp".
        Specified by:
        getName in interface MTP
        Returns:
        A string, that is the name of this MTP.