|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.j_spaces.jms.GSSessionImpl
public abstract class GSSessionImpl
GigaSpaces implementation of the javax.jms.Session
interface.
Field Summary | |
---|---|
static long |
ackLeaseTime
|
static HashSet |
invalidSelectorIdentifiers
|
static Object[][] |
JMSX_CLIENT_NAMES
Recognized provider property names that may be set by clients, and their expected types |
String |
m_sessionID
|
static HashSet<String> |
reservedSelectorIdentifiers
|
static long |
txLeaseTime
|
Fields inherited from interface javax.jms.Session |
---|
AUTO_ACKNOWLEDGE, CLIENT_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE, SESSION_TRANSACTED |
Constructor Summary | |
---|---|
GSSessionImpl(com.j_spaces.jms.GSConnectionImpl conn,
boolean isTransacted,
int acknowledgeMode,
Transaction transaction)
Creates a session. |
Method Summary | |
---|---|
void |
acknowledge()
Note that the acknowledge method of Message acknowledges all messages received on that messages session. |
boolean |
cancel(Transaction tx)
|
void |
close()
|
void |
commit()
API method for m_tx commit. |
QueueBrowser |
createBrowser(Queue arg0)
|
QueueBrowser |
createBrowser(Queue arg0,
String arg1)
|
BytesMessage |
createBytesMessage()
Creates a GSBytesMessageImpl object. |
BytesMessage |
createBytesMessage(byte[] bytesArrayBody)
Creates a GSBytesMessageImpl object. |
MessageConsumer |
createConsumer(Destination destination)
|
MessageConsumer |
createConsumer(Destination destination,
String messageSelector)
|
MessageConsumer |
createConsumer(Destination destination,
String messageSelector,
boolean NoLocal)
|
TopicSubscriber |
createDurableSubscriber(Topic arg0,
String arg1)
|
TopicSubscriber |
createDurableSubscriber(Topic arg0,
String arg1,
String arg2,
boolean arg3)
|
MapMessage |
createMapMessage()
Creates a GSMapMessageImpl object. |
MapMessage |
createMapMessage(HashMap jmsHashMapBody)
Creates a GSMapMessageImpl object. |
Message |
createMessage()
|
ObjectMessage |
createObjectMessage()
Creates a GSObjectMessageImpl object. |
ObjectMessage |
createObjectMessage(Serializable object)
Creates a GSObjectMessageImpl object. |
MessageProducer |
createProducer(Destination destination)
|
Queue |
createQueue(String arg0)
|
StreamMessage |
createStreamMessage()
Creates a StreamMessage object. |
TemporaryQueue |
createTemporaryQueue()
|
TemporaryTopic |
createTemporaryTopic()
|
TextMessage |
createTextMessage()
Creates an initialized TextMessage object. |
TextMessage |
createTextMessage(String text)
Creates an initialized TextMessage object. |
Topic |
createTopic(String arg0)
|
int |
getAcknowledgeMode()
JMS 1.1 API |
int |
getConsumersC()
|
String |
getJMSProviderName()
|
MessageListener |
getMessageListener()
|
int |
getMessagesC()
|
int |
getNumOfConsumedMsg()
|
int |
getNumOfProducedMsg()
|
int |
getProducersC()
|
String |
getSessionID()
|
boolean |
getTransacted()
|
boolean |
isLocalConsumer(String consKey)
|
boolean |
isLocalProducer(String prodKey)
returns true if the prodKey is a Producer key which is part of the current session's Producer's vector, otherwise it is considered as a Producer which belongs to other session and returns false; |
void |
recover()
|
void |
removeExternalEntryFromSpace(ExternalEntry extEntryToClear)
Removing the ExternalMessage, using space.clear(), from the space. |
void |
removeJMSAckDataEntryFromSpace(com.j_spaces.jms.JMSAckDataEntry ackDataEntry)
Removing/clear() the JMSAckDataEntry from the space usually called after successful Ack to the producer or while cancel(). |
void |
rollback()
API method for m_tx rollback Calling the space LocalTransactionManager m_tx.abort() |
void |
run()
|
void |
setConsumersC(int i)
|
void |
setMessageListener(MessageListener listener)
|
void |
setMessagesC(int i)
|
void |
setProducersC(int i)
|
void |
setSessionID(String string)
|
String |
toString()
|
void |
unsubscribe(String arg0)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public String m_sessionID
public static final long txLeaseTime
public static final long ackLeaseTime
public static final HashSet<String> reservedSelectorIdentifiers
public static final HashSet invalidSelectorIdentifiers
public static final Object[][] JMSX_CLIENT_NAMES
Constructor Detail |
---|
public GSSessionImpl(com.j_spaces.jms.GSConnectionImpl conn, boolean isTransacted, int acknowledgeMode, Transaction transaction) throws JMSException
conn
- The connection the session belongs to.isTransacted
- true
for a m_isTransacted session.acknowledgeMode
- 1 (auto), 2 (client) or 3 (dups ok).transaction
- session transaction
JMSException
- In case of an invalid acknowledge mode.Method Detail |
---|
public String getJMSProviderName()
public BytesMessage createBytesMessage() throws JMSException
GSBytesMessageImpl
object. A BytesMessage
object is used to send a message containing a stream of
uninterpreted bytes.
createBytesMessage
in interface Session
JMSException
- if the JMS provider fails to create this message due to
some internal error.
IllegalStateException
- If the session is closed.Session.createBytesMessage()
public BytesMessage createBytesMessage(byte[] bytesArrayBody) throws JMSException
GSBytesMessageImpl
object. A BytesMessage
object is used to send a message containing a stream of
uninterpreted bytes. This method is used in MessageConsumer.recieve()
when the JMSMessageID is known already.
bytesArrayBody
-
JMSException
- if the JMS provider fails to create this message due to
some internal error.
IllegalStateException
- If the session is closed.Session.createBytesMessage()
public MapMessage createMapMessage() throws JMSException
GSMapMessageImpl
object. A
GSMapMessageImpl
object is used to send a self-defining set of
name-value pairs, where names are String
objects and
values are primitive values in the Java programming language.
createMapMessage
in interface Session
JMSException
- if the JMS provider fails to create this message due to
some internal error.
IllegalStateException
- If the session is closed.Session.createMapMessage()
public MapMessage createMapMessage(HashMap jmsHashMapBody) throws JMSException
GSMapMessageImpl
object. A
GSMapMessageImpl
object is used to send a self-defining set of
name-value pairs, where names are String
objects and
values are primitive values in the Java programming language.
jmsHashMapBody
-
JMSException
- if the JMS provider fails to create this message due to
some internal error.
IllegalStateException
- If the session is closed.Session.createMapMessage()
public Message createMessage() throws JMSException
createMessage
in interface Session
IllegalStateException
- If the session is closed.
JMSException
Session.createMessage()
public ObjectMessage createObjectMessage() throws JMSException
GSObjectMessageImpl
object. A
GSObjectMessageImpl
object is used to send a Serializable java
object.
createObjectMessage
in interface Session
IllegalStateException
- If the session is closed.
JMSException
Session.createObjectMessage()
public ObjectMessage createObjectMessage(Serializable object) throws JMSException
GSObjectMessageImpl
object. A
GSObjectMessageImpl
object is used to send a Serializable java
object.
createObjectMessage
in interface Session
object
-
IllegalStateException
- If the session is closed.
JMSException
Session.createObjectMessage(java.io.Serializable)
public StreamMessage createStreamMessage() throws JMSException
StreamMessage
object. A StreamMessage
object is used to send a
self-defining stream of primitive values in the Java programming language.
createStreamMessage
in interface Session
IllegalStateException
- If the session is closed.
JMSException
Session.createStreamMessage()
public TextMessage createTextMessage() throws JMSException
TextMessage
object. A
TextMessage
object is used to send a message containing a
String
.
createTextMessage
in interface Session
JMSException
- if the JMS provider fails to create this message due to
some internal error.
IllegalStateException
- If the session is closed.Session.createTextMessage()
public TextMessage createTextMessage(String text) throws JMSException
TextMessage
object. A
TextMessage
object is used to send a message containing a
String
.
createTextMessage
in interface Session
text
- the string used to initialize this message
JMSException
- if the JMS provider fails to create this message due to
some internal error.
IllegalStateException
- If the session is closed.Session.createTextMessage(java.lang.String)
public boolean getTransacted() throws JMSException
getTransacted
in interface Session
JMSException
Session.getTransacted()
public int getAcknowledgeMode() throws IllegalStateException
getAcknowledgeMode
in interface Session
IllegalStateException
Session.getAcknowledgeMode()
public void acknowledge() throws JMSException
IllegalStateException
- If the connection is broken.
JMSException
public void commit() throws JMSException
commit
in interface Session
IllegalStateException
- If the session is m_closed or it is NOT transacted
JMSException
Session.commit()
public void rollback() throws JMSException
rollback
in interface Session
IllegalStateException
- If the session is closed.
JMSException
Session.rollback()
public boolean cancel(Transaction tx) throws IllegalStateException
tx
-
IllegalStateException
public void close() throws JMSException
close
in interface Session
JMSException
public void recover() throws IllegalStateException
recover
in interface Session
IllegalStateException
public MessageListener getMessageListener() throws JMSException
getMessageListener
in interface Session
JMSException
public void setMessageListener(MessageListener listener) throws JMSException
setMessageListener
in interface Session
JMSException
public void run()
run
in interface Runnable
run
in interface Session
public MessageProducer createProducer(Destination destination) throws JMSException
createProducer
in interface Session
JMSException
public MessageConsumer createConsumer(Destination destination) throws JMSException
createConsumer
in interface Session
JMSException
public MessageConsumer createConsumer(Destination destination, String messageSelector) throws JMSException
createConsumer
in interface Session
JMSException
public MessageConsumer createConsumer(Destination destination, String messageSelector, boolean NoLocal) throws JMSException
createConsumer
in interface Session
JMSException
public String getSessionID()
public void setSessionID(String string)
string
- public void removeExternalEntryFromSpace(ExternalEntry extEntryToClear) throws JMSException
extEntryToClear
-
JMSMessage
JMSException
public void removeJMSAckDataEntryFromSpace(com.j_spaces.jms.JMSAckDataEntry ackDataEntry) throws JMSException
ackDataEntry
-
JMSException
public boolean isLocalProducer(String prodKey)
prodKey
- public boolean isLocalConsumer(String consKey)
public int getConsumersC()
public int getMessagesC()
public int getProducersC()
public void setConsumersC(int i)
public void setMessagesC(int i)
public void setProducersC(int i)
public String toString()
toString
in class Object
public int getNumOfConsumedMsg()
public int getNumOfProducedMsg()
public Queue createQueue(String arg0) throws JMSException
createQueue
in interface Session
JMSException
public Topic createTopic(String arg0) throws JMSException
createTopic
in interface Session
JMSException
public TopicSubscriber createDurableSubscriber(Topic arg0, String arg1) throws JMSException
createDurableSubscriber
in interface Session
JMSException
public TopicSubscriber createDurableSubscriber(Topic arg0, String arg1, String arg2, boolean arg3) throws JMSException
createDurableSubscriber
in interface Session
JMSException
public QueueBrowser createBrowser(Queue arg0) throws JMSException
createBrowser
in interface Session
JMSException
public QueueBrowser createBrowser(Queue arg0, String arg1) throws JMSException
createBrowser
in interface Session
JMSException
public TemporaryQueue createTemporaryQueue() throws JMSException
createTemporaryQueue
in interface Session
JMSException
public TemporaryTopic createTemporaryTopic() throws JMSException
createTemporaryTopic
in interface Session
JMSException
public void unsubscribe(String arg0) throws JMSException
unsubscribe
in interface Session
JMSException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |