Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

mobile.jmsapi
Class Session  view Session download Session.java

java.lang.Object
  extended bymobile.jmsapi.Id_class
      extended bymobile.jmsapi.Session
All Implemented Interfaces:
mobile.bearer.http.Protocol
Direct Known Subclasses:
QueueSession, TopicSession

public abstract class Session
extends Id_class
implements mobile.bearer.http.Protocol

class representing session of connection with JMS provider


Field Summary
static int AUTO_ACKNOWLEDGE
           
static int CLIENT_ACKNOWLEDGE
           
static int DUPS_OK_ACKNOWLEDGE
           
static int SESSION_TRANSACTED
           
private  int transacted
           determines if this session is transacted
 
Fields inherited from class mobile.jmsapi.Id_class
id
 
Fields inherited from interface mobile.bearer.http.Protocol
ACKNOWLEDGE_MESSAGE, CLOSE_CONNECTION, CLOSE_MESSAGE_CONSUMER, CLOSE_MESSAGE_PRODUCER, COMMIT, CREATE_CONNECTION, CREATE_DURABLE_CONSUMER, CREATE_DURABLE_TOPIC_SUBSCRIBER, CREATE_QUEUE_CONNECTION, CREATE_QUEUE_RECEIVER, CREATE_QUEUE_SENDER, CREATE_QUEUE_SESSION, CREATE_RECEIVER, CREATE_SENDER, CREATE_SESSION, CREATE_TEMPORARY_DESTINATION, CREATE_TEMPORARY_QUEUE, CREATE_TEMPORARY_TOPIC, CREATE_TOPIC_CONNECTION, CREATE_TOPIC_PUBLISHER, CREATE_TOPIC_SESSION, CREATE_TOPIC_SUBSCRIBER, DELETE_TEMPORARY_DESTINATION, DELETE_TEMPORARY_QUEUE, DELETE_TEMPORARY_TOPIC, EXC_INVALID_DESTINATION, EXC_NAMING, EXC_OTHER, EXC_RESOURCE_ALLOCATION, INT_LEN, LONG_LEN, LOOKUP, MAX_BYTES_LEN, PUBLISH_BYTES_MESSAGE, PUBLISH_TEXT_MESSAGE, QUEUE, RECEIVE_MESSAGE, RECEIVE_MESSAGE_FROM_QUEUE, RECEIVE_MESSAGE_FROM_TOPIC, RECEIVE_MESSAGE_TIMEOUT, REP_BYTES_MESSAGE, REP_BYTES_MESSAGE_FROM_QUEUE, REP_BYTES_MESSAGE_FROM_TOPIC, REP_CONNECTION, REP_CONNECTION_FACTORY, REP_DURABLE_TOPIC_SUBSCRIBER, REP_QUEUE, REP_QUEUE_CONNECTION, REP_QUEUE_CONNECTION_FACTORY, REP_QUEUE_RECEIVER, REP_QUEUE_SENDER, REP_QUEUE_SESSION, REP_RECEIVER, REP_SENDER, REP_SESSION, REP_TEMPORARY_DESTINATION, REP_TEMPORARY_QUEUE, REP_TEMPORARY_TOPIC, REP_TEXT_MESSAGE, REP_TEXT_MESSAGE_FROM_QUEUE, REP_TEXT_MESSAGE_FROM_TOPIC, REP_TOPIC, REP_TOPIC_CONNECTION, REP_TOPIC_CONNECTION_FACTORY, REP_TOPIC_PUBLISHER, REP_TOPIC_SESSION, REP_TOPIC_SUBSCRIBER, ROLLBACK, SEND_BYTES_MESSAGE, SEND_TEXT_MESSAGE, START_CONNECTION, STOP_CONNECTION, TEMPRORARY, TOPIC
 
Constructor Summary
Session()
           
 
Method Summary
 void commit()
           Commits all messages done in this transaction and releases any locks currently held.
 BytesMessage createBytesMessage()
           creates new BytesMessage to be filled and sent
 Consumer createConsumer(Destination _dest)
           creates a new message consumer from specified source
 Producer createProducer(Destination _dest)
           creates new message producer for specified destination
 TextMessage createTextMessage()
           creates new TextMessage to be filled and sent
protected abstract  Consumer newConsumer()
           A "subclass responsibility" method Creates new Consumer, apropriate to the subclass type (QueueReciever xor TopicSubscriber)
protected abstract  Producer newProducer()
           A "subclass responsibility" method creates new Producer, apropriate to the subclass type (QueueSender xor TopicPublisher)
 void rollback()
            Rolls back any messages done in this transaction and releases any locks currently held.
 
Methods inherited from class mobile.jmsapi.Id_class
getObject, log, request, request, request, request, request, request, request, strToBool, strToLong, TYPE_MASK
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AUTO_ACKNOWLEDGE

public static final int AUTO_ACKNOWLEDGE
See Also:
Constant Field Values

DUPS_OK_ACKNOWLEDGE

public static final int DUPS_OK_ACKNOWLEDGE
See Also:
Constant Field Values

CLIENT_ACKNOWLEDGE

public static final int CLIENT_ACKNOWLEDGE
See Also:
Constant Field Values

SESSION_TRANSACTED

public static final int SESSION_TRANSACTED
See Also:
Constant Field Values

transacted

private int transacted

determines if this session is transacted

Constructor Detail

Session

public Session()
Method Detail

newConsumer

protected abstract Consumer newConsumer()

A "subclass responsibility" method Creates new Consumer, apropriate to the subclass type (QueueReciever xor TopicSubscriber)


newProducer

protected abstract Producer newProducer()

A "subclass responsibility" method creates new Producer, apropriate to the subclass type (QueueSender xor TopicPublisher)


createTextMessage

public TextMessage createTextMessage()

creates new TextMessage to be filled and sent


createBytesMessage

public BytesMessage createBytesMessage()

creates new BytesMessage to be filled and sent


commit

public void commit()
            throws JMSException

Commits all messages done in this transaction and releases any locks currently held.


rollback

public void rollback()
              throws JMSException

 Rolls back any messages done in this transaction and releases any locks currently held.


createConsumer

public Consumer createConsumer(Destination _dest)
                        throws JMSException

creates a new message consumer from specified source


createProducer

public Producer createProducer(Destination _dest)
                        throws JMSException

creates new message producer for specified destination