org.objectweb.dream.protocol.messagePassing
Class BufferedMessagePassingProtocolImpl.Session

java.lang.Object
  extended by org.objectweb.dream.protocol.messagePassing.BufferedMessagePassingProtocolImpl.Session
All Implemented Interfaces:
IncomingPush, MessagePassingOutgoingPush
Enclosing class:
BufferedMessagePassingProtocolImpl

protected class BufferedMessagePassingProtocolImpl.Session
extends Object
implements MessagePassingOutgoingPush, IncomingPush


Nested Class Summary
protected  class BufferedMessagePassingProtocolImpl.Session.SendTask
           
 
Field Summary
protected  boolean closed
           
protected  org.objectweb.dream.protocol.messagePassing.BufferedMessagePassingProtocolImpl.Session.ListElem first
           
protected  org.objectweb.dream.protocol.messagePassing.BufferedMessagePassingProtocolImpl.Session.ListElem last
           
protected  MessagePassingOutgoingPush lowerOutgoingPush
           
protected  BufferedMessagePassingProtocolImpl.Session.SendTask sendTask
           
protected  IncomingPush upperIncomingPush
           
 
Constructor Summary
protected BufferedMessagePassingProtocolImpl.Session(IncomingPush upperIncomingPush)
           
 
Method Summary
 ExportIdentifier getLocalExportIdentifier()
          Returns the ExportIdentifier identifying the local access point.
 void incomingClosed(Object outgoingPush, Exception exception)
          Notifies the session, this interface belong, that the lower session accessible through the given interface has been unexpectedly closed.
 void incomingPush(Message message)
          Gives an incoming message to a protocol.
protected  void initialize(MessagePassingOutgoingPush lowerPush)
           
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

upperIncomingPush

protected IncomingPush upperIncomingPush

lowerOutgoingPush

protected MessagePassingOutgoingPush lowerOutgoingPush

sendTask

protected BufferedMessagePassingProtocolImpl.Session.SendTask sendTask

closed

protected boolean closed

first

protected org.objectweb.dream.protocol.messagePassing.BufferedMessagePassingProtocolImpl.Session.ListElem first

last

protected org.objectweb.dream.protocol.messagePassing.BufferedMessagePassingProtocolImpl.Session.ListElem last
Constructor Detail

BufferedMessagePassingProtocolImpl.Session

protected BufferedMessagePassingProtocolImpl.Session(IncomingPush upperIncomingPush)
Method Detail

initialize

protected void initialize(MessagePassingOutgoingPush lowerPush)

getLocalExportIdentifier

public ExportIdentifier getLocalExportIdentifier()
Description copied from interface: MessagePassingOutgoingPush
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).

Specified by:
getLocalExportIdentifier in interface MessagePassingOutgoingPush
Returns:
an identifier of the local access point.
See Also:
MessagePassingOutgoingPush.getLocalExportIdentifier()

outgoingPush

public void outgoingPush(Message message,
                         ExportIdentifier to)
                  throws InvalidExportIdentifierException,
                         IOPushException
Description copied from interface: MessagePassingOutgoingPush
Sends the given message to the access point identified by to.

Specified by:
outgoingPush in interface MessagePassingOutgoingPush
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.
See Also:
MessagePassingOutgoingPush.outgoingPush(Message, ExportIdentifier)

outgoingClose

public void outgoingClose(IncomingPush incomingPush)
                   throws IOException
Description copied from interface: MessagePassingOutgoingPush
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.

Specified by:
outgoingClose in interface MessagePassingOutgoingPush
Parameters:
incomingPush - the interface on which incoming messages of the closed access point were received.
Throws:
IOException - the closing process failed.
See Also:
MessagePassingOutgoingPush.outgoingClose(IncomingPush)

incomingPush

public void incomingPush(Message message)
                  throws PushException
Description copied from interface: IncomingPush
Gives an incoming message to a protocol.

Specified by:
incomingPush in interface IncomingPush
Parameters:
message - the message to give to the component.
Throws:
PushException - if an exception occurs.
See Also:
IncomingPush.incomingPush(Message)

incomingClosed

public void incomingClosed(Object outgoingPush,
                           Exception exception)
Description copied from interface: IncomingPush
Notifies the session, this interface belong, that the lower session accessible through the given interface has been unexpectedly closed.

Specified by:
incomingClosed in interface IncomingPush
Parameters:
outgoingPush - the interface provided by the closed session.
exception - the exception that forced the session to close. May be null.
See Also:
IncomingPush.incomingClosed(Object, Exception)


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