jrun.jms.core.client.mipc
Class IpcJmsMessageListener

java.lang.Object
  |
  +--jrun.jms.core.client.mipc.IpcJmsMessageListener

public class IpcJmsMessageListener
extends java.lang.Object

All callbacks for ipc message delivery are registerd with the single instance of this object, by their session id's. Arriving messages are also contain a session id, which is used to look up the callback this message is destined for.

Version:
$Revision: 1.5 $ $Date: 2001/05/30 06:54:52 $
Author:
Jim Mourikis
See Also:
org.exolab.jms.client.mipc.IpcJmsSessionStub

Method Summary
 void closeAllSessions()
          Close all session callbacks.
 void closeSession(java.lang.String sessionId)
          A session has been closed.
static IpcJmsMessageListener instance()
          Static method to create the one and only instance of this class.
 void onMessage(java.lang.String sessionId, javax.jms.Message message)
          This method is called back by the server whenever it has a message for this session.
 void onMessages(java.lang.String sessionId, java.util.Vector messages)
          This method is called back by the server whenever it has one or more messages for this session.
 void setListener(java.lang.String sessionId, JmsMessageListener listener)
          Set a new callback for a session.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

instance

public static IpcJmsMessageListener instance()
Static method to create the one and only instance of this class.
Returns:
IpcJmsMessageListener The one and only instance.

setListener

public void setListener(java.lang.String sessionId,
                        JmsMessageListener listener)
Set a new callback for a session.
Parameters:
sessionId - The unique session id.
listener - The listener callback to call when new messages arrive.

closeSession

public void closeSession(java.lang.String sessionId)
A session has been closed. remove its callback
Parameters:
sessionId - The unique session id.

closeAllSessions

public void closeAllSessions()
Close all session callbacks.
Parameters:
sessionId - The unique session id.

onMessage

public void onMessage(java.lang.String sessionId,
                      javax.jms.Message message)
This method is called back by the server whenever it has a message for this session.
Parameters:
sessionId - The session this message is for.
message - The message being sent to this session.

onMessages

public void onMessages(java.lang.String sessionId,
                       java.util.Vector messages)
This method is called back by the server whenever it has one or more messages for this session.
Parameters:
sessionId - The session this message is for.
messages - The messages


Copyright � 2002 Macromedia Corporation. All Rights Reserved.