Package com.swiftmq.jms.v750
Class ConnectionImpl
- java.lang.Object
-
- com.swiftmq.tools.requestreply.RequestServiceRegistry
-
- com.swiftmq.jms.v750.ConnectionImpl
-
- All Implemented Interfaces:
SwiftMQConnection,Recreatable,RecreatableConnection,ExceptionHandler,InboundHandler,ReplyHandler,RequestHandler,TimerListener,jakarta.jms.Connection,java.lang.AutoCloseable
- Direct Known Subclasses:
QueueConnectionImpl,TopicConnectionImpl,XAConnectionImpl
public class ConnectionImpl extends RequestServiceRegistry implements SwiftMQConnection, jakarta.jms.Connection, ReplyHandler, RequestHandler, TimerListener, InboundHandler, ExceptionHandler, RecreatableConnection
-
-
Field Summary
Fields Modifier and Type Field Description static intCLIENT_VERSIONstatic intCONNECTED_STARTEDstatic intCONNECTED_STOPPEDstatic intDISCONNECTEDstatic java.lang.StringDISPATCH_TOKENstatic intINITIAL_KEEPALIVE_COUNT
-
Constructor Summary
Constructors Modifier Constructor Description protectedConnectionImpl(java.lang.String userName, java.lang.String password, Reconnector reconnector)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddReconnectListener(ReconnectListener listener)voidcancel(boolean closeReconnector)voidcancelAndNotify(java.lang.Exception exception, boolean closeReconnector)voidclose()jakarta.jms.ConnectionConsumercreateConnectionConsumer(jakarta.jms.Destination destination, java.lang.String messageSelector, jakarta.jms.ServerSessionPool sessionPool, int maxMessages)jakarta.jms.ConnectionConsumercreateConnectionConsumer(jakarta.jms.Queue queue, java.lang.String messageSelector, jakarta.jms.ServerSessionPool sessionPool, int maxMessages)jakarta.jms.ConnectionConsumercreateConnectionConsumer(jakarta.jms.Topic topic, java.lang.String messageSelector, jakarta.jms.ServerSessionPool sessionPool, int maxMessages)jakarta.jms.ConnectionConsumercreateDurableConnectionConsumer(jakarta.jms.Topic topic, java.lang.String subscriptionName, java.lang.String messageSelector, jakarta.jms.ServerSessionPool sessionPool, int maxMessages)jakarta.jms.SessioncreateSession()jakarta.jms.SessioncreateSession(boolean transacted, int acknowledgeMode)jakarta.jms.SessioncreateSession(int i)jakarta.jms.ConnectionConsumercreateSharedConnectionConsumer(jakarta.jms.Topic topic, java.lang.String s, java.lang.String s1, jakarta.jms.ServerSessionPool serverSessionPool, int i)jakarta.jms.ConnectionConsumercreateSharedDurableConnectionConsumer(jakarta.jms.Topic topic, java.lang.String s, java.lang.String s1, jakarta.jms.ServerSessionPool serverSessionPool, int i)voiddataAvailable(LengthCaptureDataInput in)voiddeleteTempQueue(java.lang.String queueName)RequestgetAuthenticateRequest()RequestgetAuthenticateResponse()java.lang.StringgetClientID()intgetConnectionId()intgetConnectionState()jakarta.jms.ExceptionListenergetExceptionListener()RequestgetGetClientIdRequest()java.lang.StringgetInternalCID()longgetLastConnectionLost()jakarta.jms.ConnectionMetaDatagetMetaData()RequestgetMetaDataRequest()java.util.ListgetRecreatables()RequestgetRecreateRequest()RequestgetSetClientIdRequest()java.lang.StringgetUserName()RequestgetVersionRequest()voidhandOver(Connection connection)booleanisDuplicateMessageDetection()booleanisReconnectEnabled()voidonException(java.io.IOException exception)voidperformReply(Reply reply)voidperformRequest(Request request)voidperformTimeAction(TimerEvent evt)voidprepareForReconnect()voidremoveReconnectListener(ReconnectListener listener)voidsetAuthenticateReply(Reply reply)voidsetAuthenticateResponseReply(Reply reply)voidsetClientID(java.lang.String s)voidsetDuplicateBacklogSize(int duplicateBacklogSize)voidsetDuplicateMessageDetection(boolean duplicateMessageDetection)voidsetExceptionListener(jakarta.jms.ExceptionListener listener)voidsetGetClientIdReply(Reply reply)voidsetMetaDataReply(Reply reply)voidsetRecreateReply(Reply reply)voidsetSetClientIdReply(Reply reply)voidsetVersionReply(Reply reply)voidstart()voidstop()protected voidverifyState()-
Methods inherited from class com.swiftmq.tools.requestreply.RequestServiceRegistry
addRequestService, dispatch, getNextFreeDispatchId, getNumberServices, getRequestService, isSendExceptionEnabled, removeRequestService, setReplyHandler
-
-
-
-
Field Detail
-
DISPATCH_TOKEN
public static final java.lang.String DISPATCH_TOKEN
- See Also:
- Constant Field Values
-
CLIENT_VERSION
public static final int CLIENT_VERSION
- See Also:
- Constant Field Values
-
DISCONNECTED
public static final int DISCONNECTED
- See Also:
- Constant Field Values
-
CONNECTED_STOPPED
public static final int CONNECTED_STOPPED
- See Also:
- Constant Field Values
-
CONNECTED_STARTED
public static final int CONNECTED_STARTED
- See Also:
- Constant Field Values
-
INITIAL_KEEPALIVE_COUNT
public static final int INITIAL_KEEPALIVE_COUNT
-
-
Constructor Detail
-
ConnectionImpl
protected ConnectionImpl(java.lang.String userName, java.lang.String password, Reconnector reconnector) throws jakarta.jms.JMSException- Throws:
jakarta.jms.JMSException
-
-
Method Detail
-
isReconnectEnabled
public boolean isReconnectEnabled()
- Specified by:
isReconnectEnabledin interfaceSwiftMQConnection
-
getLastConnectionLost
public long getLastConnectionLost()
-
getConnectionId
public int getConnectionId()
-
prepareForReconnect
public void prepareForReconnect()
- Specified by:
prepareForReconnectin interfaceRecreatableConnection
-
getVersionRequest
public Request getVersionRequest()
- Specified by:
getVersionRequestin interfaceRecreatableConnection
-
setVersionReply
public void setVersionReply(Reply reply) throws java.lang.Exception
- Specified by:
setVersionReplyin interfaceRecreatableConnection- Throws:
java.lang.Exception
-
getAuthenticateRequest
public Request getAuthenticateRequest()
- Specified by:
getAuthenticateRequestin interfaceRecreatableConnection
-
setAuthenticateReply
public void setAuthenticateReply(Reply reply) throws java.lang.Exception
- Specified by:
setAuthenticateReplyin interfaceRecreatableConnection- Throws:
java.lang.Exception
-
getAuthenticateResponse
public Request getAuthenticateResponse()
- Specified by:
getAuthenticateResponsein interfaceRecreatableConnection
-
setAuthenticateResponseReply
public void setAuthenticateResponseReply(Reply reply) throws java.lang.Exception
- Specified by:
setAuthenticateResponseReplyin interfaceRecreatableConnection- Throws:
java.lang.Exception
-
getMetaDataRequest
public Request getMetaDataRequest()
- Specified by:
getMetaDataRequestin interfaceRecreatableConnection
-
setMetaDataReply
public void setMetaDataReply(Reply reply) throws java.lang.Exception
- Specified by:
setMetaDataReplyin interfaceRecreatableConnection- Throws:
java.lang.Exception
-
getGetClientIdRequest
public Request getGetClientIdRequest()
- Specified by:
getGetClientIdRequestin interfaceRecreatableConnection
-
setGetClientIdReply
public void setGetClientIdReply(Reply reply) throws java.lang.Exception
- Specified by:
setGetClientIdReplyin interfaceRecreatableConnection- Throws:
java.lang.Exception
-
getSetClientIdRequest
public Request getSetClientIdRequest()
- Specified by:
getSetClientIdRequestin interfaceRecreatableConnection
-
setSetClientIdReply
public void setSetClientIdReply(Reply reply) throws java.lang.Exception
- Specified by:
setSetClientIdReplyin interfaceRecreatableConnection- Throws:
java.lang.Exception
-
getRecreateRequest
public Request getRecreateRequest()
- Specified by:
getRecreateRequestin interfaceRecreatable
-
setRecreateReply
public void setRecreateReply(Reply reply)
- Specified by:
setRecreateReplyin interfaceRecreatable
-
getRecreatables
public java.util.List getRecreatables()
- Specified by:
getRecreatablesin interfaceRecreatable
-
handOver
public void handOver(Connection connection)
- Specified by:
handOverin interfaceRecreatableConnection
-
getUserName
public java.lang.String getUserName()
- Specified by:
getUserNamein interfaceSwiftMQConnection
-
getInternalCID
public java.lang.String getInternalCID()
-
isDuplicateMessageDetection
public boolean isDuplicateMessageDetection()
-
setDuplicateMessageDetection
public void setDuplicateMessageDetection(boolean duplicateMessageDetection)
-
setDuplicateBacklogSize
public void setDuplicateBacklogSize(int duplicateBacklogSize)
-
addReconnectListener
public void addReconnectListener(ReconnectListener listener)
- Specified by:
addReconnectListenerin interfaceSwiftMQConnection
-
removeReconnectListener
public void removeReconnectListener(ReconnectListener listener)
- Specified by:
removeReconnectListenerin interfaceSwiftMQConnection
-
performTimeAction
public void performTimeAction(TimerEvent evt)
- Specified by:
performTimeActionin interfaceTimerListener
-
verifyState
protected void verifyState() throws jakarta.jms.JMSException- Throws:
jakarta.jms.JMSException
-
getConnectionState
public int getConnectionState()
-
deleteTempQueue
public void deleteTempQueue(java.lang.String queueName) throws jakarta.jms.JMSException- Specified by:
deleteTempQueuein interfaceSwiftMQConnection- Throws:
jakarta.jms.JMSException
-
createSession
public jakarta.jms.Session createSession(boolean transacted, int acknowledgeMode) throws jakarta.jms.JMSException- Specified by:
createSessionin interfacejakarta.jms.Connection- Throws:
jakarta.jms.JMSException
-
createConnectionConsumer
public jakarta.jms.ConnectionConsumer createConnectionConsumer(jakarta.jms.Queue queue, java.lang.String messageSelector, jakarta.jms.ServerSessionPool sessionPool, int maxMessages) throws jakarta.jms.JMSException- Throws:
jakarta.jms.JMSException
-
createConnectionConsumer
public jakarta.jms.ConnectionConsumer createConnectionConsumer(jakarta.jms.Topic topic, java.lang.String messageSelector, jakarta.jms.ServerSessionPool sessionPool, int maxMessages) throws jakarta.jms.JMSException- Throws:
jakarta.jms.JMSException
-
createDurableConnectionConsumer
public jakarta.jms.ConnectionConsumer createDurableConnectionConsumer(jakarta.jms.Topic topic, java.lang.String subscriptionName, java.lang.String messageSelector, jakarta.jms.ServerSessionPool sessionPool, int maxMessages) throws jakarta.jms.JMSException- Specified by:
createDurableConnectionConsumerin interfacejakarta.jms.Connection- Throws:
jakarta.jms.JMSException
-
createConnectionConsumer
public jakarta.jms.ConnectionConsumer createConnectionConsumer(jakarta.jms.Destination destination, java.lang.String messageSelector, jakarta.jms.ServerSessionPool sessionPool, int maxMessages) throws jakarta.jms.JMSException- Specified by:
createConnectionConsumerin interfacejakarta.jms.Connection- Throws:
jakarta.jms.JMSException
-
getClientID
public java.lang.String getClientID() throws jakarta.jms.JMSException- Specified by:
getClientIDin interfacejakarta.jms.Connection- Throws:
jakarta.jms.JMSException
-
setClientID
public void setClientID(java.lang.String s) throws jakarta.jms.JMSException- Specified by:
setClientIDin interfacejakarta.jms.Connection- Throws:
jakarta.jms.JMSException
-
getMetaData
public jakarta.jms.ConnectionMetaData getMetaData() throws jakarta.jms.JMSException- Specified by:
getMetaDatain interfacejakarta.jms.Connection- Throws:
jakarta.jms.JMSException
-
getExceptionListener
public jakarta.jms.ExceptionListener getExceptionListener() throws jakarta.jms.JMSException- Specified by:
getExceptionListenerin interfacejakarta.jms.Connection- Throws:
jakarta.jms.JMSException
-
setExceptionListener
public void setExceptionListener(jakarta.jms.ExceptionListener listener) throws jakarta.jms.JMSException- Specified by:
setExceptionListenerin interfacejakarta.jms.Connection- Throws:
jakarta.jms.JMSException
-
performRequest
public void performRequest(Request request)
- Specified by:
performRequestin interfaceRequestHandler
-
performReply
public void performReply(Reply reply)
- Specified by:
performReplyin interfaceReplyHandler
-
onException
public void onException(java.io.IOException exception)
- Specified by:
onExceptionin interfaceExceptionHandler
-
dataAvailable
public void dataAvailable(LengthCaptureDataInput in)
- Specified by:
dataAvailablein interfaceInboundHandler
-
start
public void start() throws jakarta.jms.JMSException- Specified by:
startin interfacejakarta.jms.Connection- Throws:
jakarta.jms.JMSException
-
stop
public void stop() throws jakarta.jms.JMSException- Specified by:
stopin interfacejakarta.jms.Connection- Throws:
jakarta.jms.JMSException
-
close
public void close() throws jakarta.jms.JMSException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejakarta.jms.Connection- Throws:
jakarta.jms.JMSException
-
cancel
public void cancel(boolean closeReconnector)
-
cancelAndNotify
public void cancelAndNotify(java.lang.Exception exception, boolean closeReconnector)- Specified by:
cancelAndNotifyin interfaceRecreatableConnection
-
createSession
public jakarta.jms.Session createSession(int i) throws jakarta.jms.JMSException- Specified by:
createSessionin interfacejakarta.jms.Connection- Throws:
jakarta.jms.JMSException
-
createSession
public jakarta.jms.Session createSession() throws jakarta.jms.JMSException- Specified by:
createSessionin interfacejakarta.jms.Connection- Throws:
jakarta.jms.JMSException
-
createSharedConnectionConsumer
public jakarta.jms.ConnectionConsumer createSharedConnectionConsumer(jakarta.jms.Topic topic, java.lang.String s, java.lang.String s1, jakarta.jms.ServerSessionPool serverSessionPool, int i) throws jakarta.jms.JMSException- Specified by:
createSharedConnectionConsumerin interfacejakarta.jms.Connection- Throws:
jakarta.jms.JMSException
-
createSharedDurableConnectionConsumer
public jakarta.jms.ConnectionConsumer createSharedDurableConnectionConsumer(jakarta.jms.Topic topic, java.lang.String s, java.lang.String s1, jakarta.jms.ServerSessionPool serverSessionPool, int i) throws jakarta.jms.JMSException- Specified by:
createSharedDurableConnectionConsumerin interfacejakarta.jms.Connection- Throws:
jakarta.jms.JMSException
-
-