org.exolab.jms.client.net
Class JmsServerStubImpl

java.lang.Object
  |
  +--org.exolab.jms.client.net.JmsServerStubImpl
All Implemented Interfaces:
org.exolab.jms.net.connector.CallerListener, JmsServerStubIfc, ServerConnectionFactory

public class JmsServerStubImpl
extends java.lang.Object
implements JmsServerStubIfc, org.exolab.jms.net.connector.CallerListener

This class is responsible for returning a reference to the remote JMS server.

Version:
$Revision: 1.5 $ $Date: 2005/11/18 03:29:41 $
Author:
Jim Alateras, Tim Anderson

Constructor Summary
JmsServerStubImpl(java.util.Map properties, java.util.Map environment)
          Construct a new JmsServerStubImpl.
 
Method Summary
 ServerConnection createConnection(java.lang.String clientID, java.lang.String user, java.lang.String password)
          Creates a connection with the specified user identity.
 void disconnected(org.exolab.jms.net.connector.Caller caller)
          Notifies that a caller has been disconnected.
 void setExceptionListener(javax.jms.ExceptionListener listener)
          Set the exception listener so that the client can be notified of client disconnection events.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JmsServerStubImpl

public JmsServerStubImpl(java.util.Map properties,
                         java.util.Map environment)
Construct a new JmsServerStubImpl.
Parameters:
properties - properties to initialise this with
environment - the environment used. May be null
Method Detail

createConnection

public ServerConnection createConnection(java.lang.String clientID,
                                         java.lang.String user,
                                         java.lang.String password)
                                  throws javax.jms.JMSException
Creates a connection with the specified user identity.

The connection is created in stopped mode. No messages will be delivered until the Connection.start method is explicitly called.

If clientID is specified, it indicates the pre-configured client identifier associated with the client ConnectionFactory object.

Specified by:
createConnection in interface ServerConnectionFactory
Parameters:
clientID - the pre-configured client identifier. May be null.
user - the caller's user name. May be null
password - the caller's password. May be null
Returns:
a newly created connection
Throws:
javax.jms.InvalidClientIDException - if the JMS client specifies an invalid or duplicate client ID.
javax.jms.JMSException - if the JMS provider fails to create the connection due to some internal error.
javax.jms.JMSSecurityException - if client authentication fails due to an invalid user name or password.

setExceptionListener

public void setExceptionListener(javax.jms.ExceptionListener listener)
Set the exception listener so that the client can be notified of client disconnection events.
Specified by:
setExceptionListener in interface JmsServerStubIfc
Parameters:
listener - the exception listener

disconnected

public void disconnected(org.exolab.jms.net.connector.Caller caller)
Notifies that a caller has been disconnected.
Specified by:
disconnected in interface org.exolab.jms.net.connector.CallerListener
Parameters:
caller - the caller that was disconnected


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