Interface SessionMBean
-
- All Known Implementing Classes:
QueueSession,Session,TopicSession
public interface SessionMBean
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Closes the session.intgetAcknowledgeMode()API method.intgetCompressedMinSize()Get the compressedMinSize for this session.intgetCompressionLevel()Get the compression level for this Connection.intgetQueueMessageReadMax()Get the maximum number of messages that can be read at once from a queue for this Session.StringgetRequestStatus()The status of the current request.StringgetSessionMode()The way the session is used.StringgetStatus()Status of the sessionintgetTopicAckBufferMax()Get the maximum number of acknowledgements that can be buffered when using Session.DUPS_OK_ACKNOWLEDGE mode for this session.intgetTopicActivationThreshold()Get the threshold of activation for this session.intgetTopicPassivationThreshold()Get the threshold of passivation for this session.booleangetTransacted()API method.booleanisAsyncSend()Indicates whether the messages produced are asynchronously sent or not (without or with acknowledgment).booleanisAsyncSub()Indicates whether the subscription request is asynchronously handled or not.booleanisAutoAck()trueif the session's acknowledgements are automatic.booleanisImplicitAck()Indicates whether the messages consumed are implicitly acknowledged or not.booleanisStarted()voidunsubscribe(String name)API method.
-
-
-
Method Detail
-
getStatus
String getStatus()
Status of the session
-
getSessionMode
String getSessionMode()
The way the session is used.
-
getRequestStatus
String getRequestStatus()
The status of the current request. Only valid in when the session is used to synchronously receive messages (RECEIVE mode).
-
isAutoAck
boolean isAutoAck()
trueif the session's acknowledgements are automatic.
-
isImplicitAck
boolean isImplicitAck()
Indicates whether the messages consumed are implicitly acknowledged or not. If true messages are immediately removed from queue when delivered.This attribute is inherited from Connection at initialization, by default false.
- Returns:
- true if messages produced are implicitly acknowledged.
- See Also:
#implicitAck
-
isAsyncSend
boolean isAsyncSend()
Indicates whether the messages produced are asynchronously sent or not (without or with acknowledgment).This attribute is inherited from Connection at initialization, by default false.
- Returns:
- true if messages produced are asynchronously sent.
- See Also:
#asyncSend
-
getQueueMessageReadMax
int getQueueMessageReadMax()
Get the maximum number of messages that can be read at once from a queue for this Session.This attribute is inherited from Connection at initialization, default value is 1.
- Returns:
- The maximum number of messages that can be read at once from a queue.
- See Also:
#queueMessageReadMax
-
getTopicAckBufferMax
int getTopicAckBufferMax()
Get the maximum number of acknowledgements that can be buffered when using Session.DUPS_OK_ACKNOWLEDGE mode for this session.This attribute is inherited from Connection at initialization.
- Returns:
- The Maximum number of acknowledgements that can be buffered when using Session.DUPS_OK_ACKNOWLEDGE mode.
- See Also:
FactoryParameters.topicAckBufferMax,#topicAckBufferMax
-
getTopicPassivationThreshold
int getTopicPassivationThreshold()
Get the threshold of passivation for this session.This threshold is the maximum messages number over which the subscription is passivated.
This attribute is inherited from Connection at initialization, default value is Integer.MAX_VALUE.
- Returns:
- The maximum messages number over which the subscription is passivated.
- See Also:
#topicPassivationThreshold
-
getTopicActivationThreshold
int getTopicActivationThreshold()
Get the threshold of activation for this session.This threshold is the minimum messages number below which the subscription is activated.
This attribute is inherited from Connection at initialization, default value is 0.
- Returns:
- The minimum messages number below which the subscription is activated.
- See Also:
#topicActivationThreshold
-
isAsyncSub
boolean isAsyncSub()
Indicates whether the subscription request is asynchronously handled or not.Default value is false, the subscription is handled synchronously so the topic must be accessible.
- Returns:
- true if the subscription requests are asynchronously handled.
- Since:
- JORAM 5.0.7
-
isStarted
boolean isStarted()
-
getAcknowledgeMode
int getAcknowledgeMode() throws JMSExceptionAPI method.- Throws:
JMSException- Actually never thrown.
-
getTransacted
boolean getTransacted() throws JMSExceptionAPI method.- Throws:
IllegalStateException- If the session is closed.JMSException
-
unsubscribe
void unsubscribe(String name) throws JMSException
API method.- Throws:
IllegalStateException- If the session is closed or if the connection is broken.InvalidDestinationException- If the subscription does not exist.JMSException- If the request fails for any other reason.
-
close
void close() throws JMSExceptionCloses the session. API method.- Throws:
JMSException
-
getCompressedMinSize
int getCompressedMinSize()
Get the compressedMinSize for this session.The minimum message body size before a message body compression.
This attribute is inherited from Connection at initialization, default value is 0 no compression
- Returns:
- The minimum size before a message body compression
- See Also:
#compressedMinSize
-
getCompressionLevel
int getCompressionLevel()
Get the compression level for this Connection.This attribute is inherited from FactoryParameters, default value is Deflater.BEST_SPEED (1).
- Returns:
- The compression level
- See Also:
#compressionLevel
-
-