org.exolab.jms.server
Interface ServerConnection

All Known Implementing Classes:
JmsConnectionStubImpl, ServerConnectionImpl, RemoteServerConnection

public interface ServerConnection

Indicates the methods clients can call on the server-side implementation of the Connection interface

Version:
$Revision: 1.2 $ $Date: 2005/08/30 05:47:03 $
Author:
Tim Anderson

Method Summary
 void close()
          Closes the connection.
 ServerSession createSession(int acknowledgeMode, boolean transacted)
          Create a new session.
 java.lang.String getClientID()
          Returns the client identifier
 long getConnectionId()
          Returns the connection identifier
 void setClientID(java.lang.String clientID)
          Sets the client identifier for this connection.
 

Method Detail

getConnectionId

public long getConnectionId()
                     throws javax.jms.JMSException
Returns the connection identifier
Returns:
the connection identifier
Throws:
javax.jms.JMSException - for any JMS error

getClientID

public java.lang.String getClientID()
                             throws javax.jms.JMSException
Returns the client identifier
Returns:
the client identifier
Throws:
javax.jms.JMSException - for any JMS error

setClientID

public void setClientID(java.lang.String clientID)
                 throws javax.jms.JMSException
Sets the client identifier for this connection.
Parameters:
clientID - the unique client identifier
Throws:
javax.jms.JMSException - if the JMS provider fails to set the client ID for this connection due to some internal error.
javax.jms.InvalidClientIDException - if the JMS client specifies an invalid or duplicate client ID.
java.lang.IllegalStateException - if the JMS client attempts to set a connection's client ID at the wrong time or when it has been administratively configured.

createSession

public ServerSession createSession(int acknowledgeMode,
                                   boolean transacted)
                            throws javax.jms.JMSException
Create a new session.
Parameters:
acknowledgeMode - indicates whether the consumer or the client will acknowledge any messages it receives; ignored if the session is transacted. Legal values are Session.AUTO_ACKNOWLEDGE, Session.CLIENT_ACKNOWLEDGE, and Session.DUPS_OK_ACKNOWLEDGE.
transacted - indicates whether the session is transacted
Returns:
a newly created session
Throws:
javax.jms.JMSException - for any JMS error

close

public void close()
           throws javax.jms.JMSException
Closes the connection.
Throws:
javax.jms.JMSException - for any JMS error


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