org.exolab.jms.server.mipc
Class IpcJmsReceiver

java.lang.Object
  |
  +--org.exolab.jms.server.mipc.IpcJmsReceiver
All Implemented Interfaces:
org.exolab.core.ipc.NotifierIfc

public class IpcJmsReceiver
extends java.lang.Object
implements org.exolab.core.ipc.NotifierIfc

The receiver class handles all requests, delegating them to registered NotifierIfc instances.

Version:
$Revision: 1.8 $ $Date: 2003/08/17 01:32:26 $
Author:
Jim Mourikis
See Also:
NotifierIfc, IpcJmsServer

Constructor Summary
IpcJmsReceiver()
          Construct a new IpcJmsReceiver
 
Method Summary
 void addDispatcher(java.lang.String name, org.exolab.core.ipc.NotifierIfc dispatcher)
          Register a dispatcher to handle requests
 void disconnection(java.lang.String id)
          Invoked if the connection has been broken.
 org.exolab.core.ipc.NotifierIfc getDispatcher(java.lang.String name)
          Returns a dispatcher for the specified name
 java.io.Serializable notify(java.lang.Object object, java.lang.String id)
          A new request has been received.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IpcJmsReceiver

public IpcJmsReceiver()
Construct a new IpcJmsReceiver
Method Detail

notify

public java.io.Serializable notify(java.lang.Object object,
                                   java.lang.String id)
A new request has been received. Carry out the request, and pass back any relevent data.
Specified by:
notify in interface org.exolab.core.ipc.NotifierIfc
Parameters:
object - the request
id - the unique identifier of this connection.
Returns:
the response. This must never be null.

addDispatcher

public void addDispatcher(java.lang.String name,
                          org.exolab.core.ipc.NotifierIfc dispatcher)
Register a dispatcher to handle requests
Parameters:
name - the name of the dispatcher
dispatcher - the dispatcher

getDispatcher

public org.exolab.core.ipc.NotifierIfc getDispatcher(java.lang.String name)
Returns a dispatcher for the specified name
Parameters:
name - the name of the dipatcher
Returns:
a dispatcher corresponding to name, or null if no dispatcher is registered

disconnection

public void disconnection(java.lang.String id)
Invoked if the connection has been broken. This notifies all registered dispatchers, before removing them.
Specified by:
disconnection in interface org.exolab.core.ipc.NotifierIfc
Parameters:
id - the unique identifier of this connection.


Copyright © 1999-2004 The OpenJMS Group. All Rights Reserved.