org.jboss.jms.client
Interface SessionDelegate

All Superinterfaces:
Lifecycle (src)
All Known Implementing Classes:
P2PSessionDelegate (src)

public interface SessionDelegate
extends Lifecycle (src)

The implementation of a session


Method Summary
 void acknowledge(Message (src)  message, boolean acknowledge)
          Acknowledge a message
 void commit()
          Commit a session
 BrowserDelegate (src) createBrowser(Queue (src)  queue, java.lang.String selector)
          Create a queue browser
 BytesMessage (src) createBytesMessage()
          Create a bytes message
 ConsumerDelegate (src) createConsumer(Destination (src)  destination, java.lang.String subscription, java.lang.String selector, boolean noLocal)
          Create a consumer
 MapMessage (src) createMapMessage()
          Create a map message
 Message (src) createMessage()
          Create a message
 ObjectMessage (src) createObjectMessage(java.io.Serializable object)
          Create an object message
 ProducerDelegate (src) createProducer(Destination (src)  destination)
          Create a producer
 StreamMessage (src) createStreamMessage()
          Create a stream message
 Destination (src) createTempDestination(int type)
          Create a temporary destination
 TextMessage (src) createTextMessage(java.lang.String text)
          Create a text message
 Destination (src) getDestination(java.lang.String name)
          Retrieve a destination
 XAResource (src) getXAResource()
          Retrieve the XAResource for this session
 void recover()
          Recover a session
 void rollback()
          Rollback a session
 void run()
          Run the session listener
 void setMessageListener(MessageListener (src)  listener)
          Set the session's message listener
 void unsubscribe(java.lang.String name)
          Unsubscribe the name
 
Methods inherited from interface org.jboss.jms.client.Lifecycle (src)
close, closing
 

Method Detail

acknowledge

public void acknowledge(Message (src)  message,
                        boolean acknowledge)
Acknowledge a message

Parameters:
message - the message to acknowledge
acknowledge - true for acknowledge, false for a Nack

commit

public void commit()
            throws JMSException (src) 
Commit a session

Throws:
JMSException (src) - for any error

createBrowser

public BrowserDelegate (src)  createBrowser(Queue (src)  queue,
                                     java.lang.String selector)
                              throws JMSException (src) 
Create a queue browser

Parameters:
queue - the queue
selector - the message selector
Returns:
the browser
Throws:
JMSException (src) - for any error

createBytesMessage

public BytesMessage (src)  createBytesMessage()
                                throws JMSException (src) 
Create a bytes message

Returns:
the message
Throws:
JMSException (src) - for any error

createConsumer

public ConsumerDelegate (src)  createConsumer(Destination (src)  destination,
                                       java.lang.String subscription,
                                       java.lang.String selector,
                                       boolean noLocal)
                                throws JMSException (src) 
Create a consumer

Parameters:
destination - the destination
subscription - the subscription name
selector - the message selector
noLocal - the no local flag
Returns:
the consumer
Throws:
JMSException (src) - for any error

createMapMessage

public MapMessage (src)  createMapMessage()
                            throws JMSException (src) 
Create a map message

Returns:
the message
Throws:
JMSException (src) - for any error

createMessage

public Message (src)  createMessage()
                      throws JMSException (src) 
Create a message

Returns:
the message
Throws:
JMSException (src) - for any error

createObjectMessage

public ObjectMessage (src)  createObjectMessage(java.io.Serializable object)
                                  throws JMSException (src) 
Create an object message

Parameters:
object - the object
Returns:
the message
Throws:
JMSException (src) - for any error

createProducer

public ProducerDelegate (src)  createProducer(Destination (src)  destination)
                                throws JMSException (src) 
Create a producer

Parameters:
destination - the destination
Returns:
the producer
Throws:
JMSException (src) - for any error

createStreamMessage

public StreamMessage (src)  createStreamMessage()
                                  throws JMSException (src) 
Create a stream message

Returns:
the message
Throws:
JMSException (src) - for any error

createTempDestination

public Destination (src)  createTempDestination(int type)
                                  throws JMSException (src) 
Create a temporary destination

Parameters:
type - the type of temporary destination
Returns:
the temporary destination
Throws:
JMSException (src) - for any error

createTextMessage

public TextMessage (src)  createTextMessage(java.lang.String text)
                              throws JMSException (src) 
Create a text message

Parameters:
text - the text
Returns:
the message
Throws:
JMSException (src) - for any error

getDestination

public Destination (src)  getDestination(java.lang.String name)
                           throws JMSException (src) 
Retrieve a destination

Parameters:
name - the implementation dependent name
Returns:
the destination
Throws:
JMSException (src) - for any error

getXAResource

public XAResource (src)  getXAResource()
Retrieve the XAResource for this session

Returns:
the XAResource

recover

public void recover()
             throws JMSException (src) 
Recover a session

Throws:
JMSException (src) - for any error

rollback

public void rollback()
              throws JMSException (src) 
Rollback a session

Throws:
JMSException (src) - for any error

run

public void run()
Run the session listener

Throws:
JMSException (src) - for any error

setMessageListener

public void setMessageListener(MessageListener (src)  listener)
                        throws JMSException (src) 
Set the session's message listener

Parameters:
listener - the message listener
Throws:
JMSException (src) - for any error

unsubscribe

public void unsubscribe(java.lang.String name)
                 throws JMSException (src) 
Unsubscribe the name

Parameters:
name - the name of the subscription
Throws:
JMSException (src) - for any error