jrun.jms.core.client
Class JmsConnection

jrun.jms.core.client.JmsConnection

public abstract class JmsConnection

The JmsConnection is a client representation of a server side connection. It establishes a connection to the remote JMS server without allocating remote resources. Since the remote connection is stateless it is shared by JmsConnection objects in the same VM..

Version:
$Revision: 1.15 $ $Date: 2001/10/12 07:55:31 $
Author:
Jim Alateras

Field Summary
protected  boolean _idLocked
          kint: This flag indicates whether the client is still allowed to change the client ID or if other operations have already been called on the connection which disallow changing the client ID.
 
Method Summary
protected  void addSession(JmsSession session)
          Add the specified session to the list of managed sessions
 java.lang.String assembleClientSpecificSubscriptionName(java.lang.String name)
           
 void close()
           
 void destroy()
          Release all resources sued by this connection, including supporting sessions
 java.lang.String getClientID()
           
 java.lang.String getConnectionId()
          Return the identity of this connection.
 javax.jms.ExceptionListener getExceptionListener()
           
protected  Logger getLogger()
          Return a reference to the logger.
 javax.jms.ConnectionMetaData getMetaData()
           
protected  java.util.Enumeration getSessions()
          Return an enumeration of all sessions managed bythis connection
 boolean idIsUserSupplied()
           
protected  boolean isClosed()
          Return the overall state of the connection
protected  boolean isManaged(JmsSession session)
          Test whether the specified session is managed by this connection
protected  boolean isStopped()
          Return the running state of the connection
 void notifyExceptionListener(javax.jms.JMSException message)
          Notify the exception listener of a JMSException.
protected  void removeSession(JmsSession session)
          Remove the specified session from the list of managed sessions.
 void setClientID(java.lang.String id)
           
 void setExceptionListener(javax.jms.ExceptionListener listener)
           
 void start()
           
 void stop()
           
 

Field Detail

_idLocked

protected boolean _idLocked
kint: This flag indicates whether the client is still allowed to change the client ID or if other operations have already been called on the connection which disallow changing the client ID.
Method Detail

getClientID

public java.lang.String getClientID()
                             throws javax.jms.JMSException

setClientID

public void setClientID(java.lang.String id)
                 throws javax.jms.JMSException

getMetaData

public javax.jms.ConnectionMetaData getMetaData()
                                         throws javax.jms.JMSException

getExceptionListener

public javax.jms.ExceptionListener getExceptionListener()
                                                 throws javax.jms.JMSException

setExceptionListener

public void setExceptionListener(javax.jms.ExceptionListener listener)
                          throws javax.jms.JMSException

notifyExceptionListener

public void notifyExceptionListener(javax.jms.JMSException message)
Notify the exception listener of a JMSException. If the exception listener is not set then ignore it
Parameters:
message - message to deliver

start

public void start()
           throws javax.jms.JMSException

stop

public void stop()
          throws javax.jms.JMSException

close

public void close()
           throws javax.jms.JMSException

destroy

public void destroy()
             throws javax.jms.JMSException
Release all resources sued by this connection, including supporting sessions
Throws:
JMSException - - error completing this request

getConnectionId

public java.lang.String getConnectionId()
Return the identity of this connection. An identity is created by the server and is unique within that servers environment
Returns:
String

addSession

protected void addSession(JmsSession session)
Add the specified session to the list of managed sessions
Parameters:
session - session to register

removeSession

protected void removeSession(JmsSession session)
Remove the specified session from the list of managed sessions. If it doesn't exist then fail silently
Parameters:
session - session to remove

isManaged

protected boolean isManaged(JmsSession session)
Test whether the specified session is managed by this connection
Parameters:
session - session to test against
Returns:
boolean true if managed

getSessions

protected java.util.Enumeration getSessions()
Return an enumeration of all sessions managed bythis connection
Returns:
Enumeration

getLogger

protected Logger getLogger()
Return a reference to the logger.
Returns:
Logger

isStopped

protected boolean isStopped()
Return the running state of the connection
Returns:
boolean true if stopped

isClosed

protected boolean isClosed()
Return the overall state of the connection
Returns:
boolean true if closed

idIsUserSupplied

public boolean idIsUserSupplied()

assembleClientSpecificSubscriptionName

public java.lang.String assembleClientSpecificSubscriptionName(java.lang.String name)


Copyright � 2002 Macromedia Corporation. All Rights Reserved.