org.exolab.jms.server.mipc
Class IpcJmsServer

java.lang.Object
  |
  +--org.exolab.jms.server.mipc.IpcJmsServer
All Implemented Interfaces:
org.exolab.core.mipc.ConnectionNotifierIfc, JmsServerIfc
Direct Known Subclasses:
SslIpcJmsServer

public class IpcJmsServer
extends java.lang.Object
implements JmsServerIfc, org.exolab.core.mipc.ConnectionNotifierIfc

This class implements the JmsServerIfc and provides an IPC-based JMS Server.

Version:
$Revision: 1.18 $ $Date: 2003/08/07 13:33:09 $
Author:
Jim Mourikis
See Also:
JmsServer, IpcJmsReceiver

Constructor Summary
IpcJmsServer()
          Construct a new IpcJmsServer
 
Method Summary
 void addConnection(JmsServerSession session, org.exolab.core.mipc.MultiplexConnectionIfc connection)
          Add a new connection for this client.
 void bindConnectionFactories(javax.naming.Context context)
          Bind any factory object specified in the configuration file to the specified JNDI context.
 void connected(org.exolab.core.mipc.MultiplexConnectionIfc newConnection)
          ConnectionNotifierIfc method implementation.
protected  org.exolab.core.mipc.MultiplexConnectionServerIfc createServer(int port)
          Create an normal connection.
protected  IpcJmsReceiver getReceiver()
          Returns a new receiver for handling requests
protected  org.exolab.jms.config.types.SchemeType getScheme()
          Returns the connector scheme for this server.
protected  org.exolab.jms.config.TcpConfigurationType getTcpConfiguration()
          Returns the TCP configuration
 void init()
          Start the Ipc service in its own thread.
 void removeAllConnections()
          Remove all managed client connections
 void removeConnection(JmsServerSession session, org.exolab.core.mipc.MultiplexConnectionIfc connection)
          Remove this sessions connection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IpcJmsServer

public IpcJmsServer()
Construct a new IpcJmsServer
Method Detail

connected

public void connected(org.exolab.core.mipc.MultiplexConnectionIfc newConnection)
ConnectionNotifierIfc method implementation. The MultipleConnectionServer calls this method whenever a new MultiplexConnection is established. It gives the user of MCS an opportunity to setup channel handlers.
Specified by:
connected in interface org.exolab.core.mipc.ConnectionNotifierIfc

init

public void init()
          throws ServerException
Start the Ipc service in its own thread. This will then listen for new connections, establish connections as they arrive, and call the callback with new data when received.
Specified by:
init in interface JmsServerIfc
Following copied from interface: org.exolab.jms.server.JmsServerIfc
Throws:
ServerException - if the interface cannot be initialised

bindConnectionFactories

public void bindConnectionFactories(javax.naming.Context context)
                             throws javax.naming.NamingException,
                                    ServerException
Description copied from interface: JmsServerIfc
Bind any factory object specified in the configuration file to the specified JNDI context.
Specified by:
bindConnectionFactories in interface JmsServerIfc
Following copied from interface: org.exolab.jms.server.JmsServerIfc
Parameters:
context - context to bind factory objects
Throws:
javax.naming.NamingException - if a naming error occurs
ServerException - if a server error occurs

addConnection

public void addConnection(JmsServerSession session,
                          org.exolab.core.mipc.MultiplexConnectionIfc connection)
                   throws java.io.IOException
Add a new connection for this client.
Parameters:
session - the session
connection - the connection to the client
Throws:
java.io.IOException - if a connection error occurs

removeConnection

public void removeConnection(JmsServerSession session,
                             org.exolab.core.mipc.MultiplexConnectionIfc connection)
Remove this sessions connection
Parameters:
session - the session
connection - the connection to the client

removeAllConnections

public void removeAllConnections()
Remove all managed client connections

createServer

protected org.exolab.core.mipc.MultiplexConnectionServerIfc createServer(int port)
                                                                  throws java.io.IOException
Create an normal connection.
Parameters:
port - The port number to use.
Returns:
the created connection
Throws:
java.io.IOException - if the server fails to initialise the ip service

getScheme

protected org.exolab.jms.config.types.SchemeType getScheme()
Returns the connector scheme for this server. Defaults to tcp

getTcpConfiguration

protected org.exolab.jms.config.TcpConfigurationType getTcpConfiguration()
Returns the TCP configuration
Returns:
the TCP configuration

getReceiver

protected IpcJmsReceiver getReceiver()
Returns a new receiver for handling requests


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