|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.huihoo.jfox.ms.jms.base.ConnectionImpl
Description: This class implements javax.jms.Connection. The connection object is received from a connection factory.
Connections support concurrent use.
ConnectionMetaData object.
ExceptionListener object.
| Constructor Summary | |
ConnectionImpl(ConnectionFactoryImpl connFactory,
java.lang.String userName,
java.lang.String password)
|
|
| Method Summary | |
protected void |
addSession(SessionImpl session)
Add the specified session to the list of managed sessions |
void |
close()
Closes the connection. |
java.lang.String |
getClientID()
|
javax.jms.ExceptionListener |
getExceptionListener()
|
javax.jms.ConnectionMetaData |
getMetaData()
|
boolean |
isClosed()
Identify the connection state. |
boolean |
isStopped()
Identify the connection state. |
protected void |
removeSession(SessionImpl session)
Remove the specified session to the list of managed sessions |
void |
setClientID(java.lang.String clientID)
|
void |
setExceptionListener(javax.jms.ExceptionListener listener)
|
void |
start()
Starts (or restarts) a connection's delivery of incoming messages. |
void |
stop()
Stops the asynchronous deliveries in the session. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ConnectionImpl(ConnectionFactoryImpl connFactory,
java.lang.String userName,
java.lang.String password)
| Method Detail |
public java.lang.String getClientID()
throws javax.jms.JMSException
getClientID in interface javax.jms.Connectionjavax.jms.JMSException
public void setClientID(java.lang.String clientID)
throws javax.jms.JMSException
setClientID in interface javax.jms.Connectionjavax.jms.JMSException
public javax.jms.ConnectionMetaData getMetaData()
throws javax.jms.JMSException
getMetaData in interface javax.jms.Connectionjavax.jms.JMSException
public javax.jms.ExceptionListener getExceptionListener()
throws javax.jms.JMSException
getExceptionListener in interface javax.jms.Connectionjavax.jms.JMSException
public void setExceptionListener(javax.jms.ExceptionListener listener)
throws javax.jms.JMSException
setExceptionListener in interface javax.jms.Connectionjavax.jms.JMSException
public void start()
throws javax.jms.JMSException
start on a connection that has already been
started is ignored.
start in interface javax.jms.Connectionjavax.jms.IllegalStateException - if the connection is closed.
javax.jms.JMSException - if the JMS provider fails to start message delivery due
to some internal error.
public void stop()
throws javax.jms.JMSException
start method. When the connection
is stopped, delivery to all the connection's message consumers is
inhibited: synchronous receives block, and messages are not delivered to
message listeners.
stop in interface javax.jms.Connectionjavax.jms.IllegalStateException - if the connection is closed.
javax.jms.JMSException - if the JMS provider fails to start message delivery due
to some internal error.
public void close()
throws javax.jms.JMSException
Since a provider typically allocates significant resources outside the JVM on behalf of a connection, clients should close these resources when they are not needed. Relying on garbage collection to eventually reclaim these resources may not be timely enough.
close in interface javax.jms.Connectionjavax.jms.JMSException - if the JMS provider fails to start message delivery due
to some internal error.public boolean isClosed()
public boolean isStopped()
protected void addSession(SessionImpl session)
session - session to registerprotected void removeSession(SessionImpl session)
session - session to deregister
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||