org.objectweb.dream.protocol.messagePassing
Interface MessagePassingOutgoingPush

All Known Implementing Classes:
BufferedMessagePassingProtocolImpl.Session, FragmentationProtocolImpl.Session, SerializatorMessagePassingProtocolImpl.Session, UDPProtocolImpl.Session

public interface MessagePassingOutgoingPush

Specialized OutgoingPush interface for message passing protocol. Since this outgoing push interface is not connected to a given remote incoming push interface, a destination identifier is associated to each outgoing message.


Method Summary
 ExportIdentifier getLocalExportIdentifier()
          Returns the ExportIdentifier identifying the local access point.
 void outgoingClose(IncomingPush incomingPush)
          Closes the access point.
 void outgoingPush(Message message, ExportIdentifier to)
          Sends the given message to the access point identified by to.
 

Method Detail

getLocalExportIdentifier

ExportIdentifier getLocalExportIdentifier()
Returns the ExportIdentifier identifying the local access point.
More precisely, on remote host, messages sent using outgoingPush method with the export identifier returned by this method, will be received by the local access point and will be passed to the IncomingPush interface given at the creation of the access point (see MessagePassingProtocol.export(IncomingPush, java.util.Map)).
May return null if the IncomingPush interface given at the creation of the access point was null (depending on protocol implementation).

Returns:
an identifier of the local access point.

outgoingPush

void outgoingPush(Message message,
                  ExportIdentifier to)
                  throws InvalidExportIdentifierException,
                         IOPushException
Sends the given message to the access point identified by to.

Parameters:
message - the message to send.
to - the identifier of the access point that should received the message.
Throws:
InvalidExportIdentifierException - if the destination is invalid.
IOPushException - if something goes wrong.

outgoingClose

void outgoingClose(IncomingPush incomingPush)
                   throws IOException
Closes the access point. The implementation of this method must not call the IncomingPush.incomingClosed(java.lang.Object, java.lang.Exception) method, since this latter is only used to inform a upper session that a lower session has been closed unexpectedly.

Parameters:
incomingPush - the interface on which incoming messages of the closed access point were received.
Throws:
IOException - the closing process failed.


Copyright © 2003, 2005 - INRIA Rhone-Alpes - All Rights Reserved.