org.jboss.messaging.core.server.impl
Class ServerSessionImpl

java.lang.Object
  extended by org.jboss.messaging.core.server.impl.ServerSessionImpl
All Implemented Interfaces:
ServerSession

public class ServerSessionImpl
extends java.lang.Object
implements ServerSession

Session implementation

Version:
$Revision: 3783 $

$Id: ServerSessionImpl.java 3783 2008-02-25 12:15:14Z timfox $

Author:
Tim Fox Parts derived from JBM 1.x ServerSessionImpl by, Ovidiu Feodorov, Tim Fox, Clebert Suconic, Jeff Mesnil

Constructor Summary
ServerSessionImpl(long id, boolean autoCommitSends, boolean autoCommitAcks, boolean xa, ServerConnection connection, ResourceManager resourceManager, PacketReturner sender, PacketDispatcher dispatcher, StorageManager persistenceManager, HierarchicalRepository<QueueSettings> queueSettingsRepository, PostOffice postOffice, SecurityStore securityStore)
           
 
Method Summary
 void acknowledge(long deliveryID, boolean allUpTo)
           
 void addDestination(SimpleString address, boolean temporary)
           
 void cancel(long deliveryID, boolean expired)
           
 void close()
           
 void commit()
           
 SessionCreateBrowserResponseMessage createBrowser(SimpleString queueName, SimpleString filterString)
           
 SessionCreateConsumerResponseMessage createConsumer(long clientTargetID, SimpleString queueName, SimpleString filterString, boolean noLocal, boolean autoDeleteQueue, int windowSize, int maxRate)
           
 SessionCreateProducerResponseMessage createProducer(long clientTargetID, SimpleString address, int windowSize, int maxRate)
          Create a producer for the specified address
 void createQueue(SimpleString address, SimpleString queueName, SimpleString filterString, boolean durable, boolean temporary)
           
 void deleteQueue(SimpleString queueName)
           
 SessionBindingQueryResponseMessage executeBindingQuery(SessionBindingQueryMessage request)
           
 SessionQueueQueryResponseMessage executeQueueQuery(SessionQueueQueryMessage request)
           
 ServerConnection getConnection()
           
 long getID()
           
 java.util.List<javax.transaction.xa.Xid> getInDoubtXids()
           
 int getXATimeout()
           
 void handleDelivery(MessageReference ref, ServerConsumer consumer)
           
 void promptDelivery(Queue queue)
           
 void removeBrowser(ServerBrowserImpl browser)
           
 void removeConsumer(ServerConsumer consumer)
           
 void removeDestination(SimpleString address, boolean temporary)
           
 void removeProducer(ServerProducer producer)
           
 void rollback()
           
 void send(ServerMessage msg)
           
 void setStarted(boolean s)
           
 boolean setXATimeout(int timeoutSeconds)
           
 java.lang.String toString()
           
 SessionXAResponseMessage XACommit(boolean onePhase, javax.transaction.xa.Xid xid)
           
 SessionXAResponseMessage XAEnd(javax.transaction.xa.Xid xid, boolean failed)
           
 SessionXAResponseMessage XAForget(javax.transaction.xa.Xid xid)
           
 SessionXAResponseMessage XAJoin(javax.transaction.xa.Xid xid)
           
 SessionXAResponseMessage XAPrepare(javax.transaction.xa.Xid xid)
           
 SessionXAResponseMessage XAResume(javax.transaction.xa.Xid xid)
           
 SessionXAResponseMessage XARollback(javax.transaction.xa.Xid xid)
           
 SessionXAResponseMessage XAStart(javax.transaction.xa.Xid xid)
           
 SessionXAResponseMessage XASuspend()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ServerSessionImpl

public ServerSessionImpl(long id,
                         boolean autoCommitSends,
                         boolean autoCommitAcks,
                         boolean xa,
                         ServerConnection connection,
                         ResourceManager resourceManager,
                         PacketReturner sender,
                         PacketDispatcher dispatcher,
                         StorageManager persistenceManager,
                         HierarchicalRepository<QueueSettings> queueSettingsRepository,
                         PostOffice postOffice,
                         SecurityStore securityStore)
                  throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

getID

public long getID()
Specified by:
getID in interface ServerSession

getConnection

public ServerConnection getConnection()

removeBrowser

public void removeBrowser(ServerBrowserImpl browser)
                   throws java.lang.Exception
Specified by:
removeBrowser in interface ServerSession
Throws:
java.lang.Exception

removeConsumer

public void removeConsumer(ServerConsumer consumer)
                    throws java.lang.Exception
Specified by:
removeConsumer in interface ServerSession
Throws:
java.lang.Exception

removeProducer

public void removeProducer(ServerProducer producer)
                    throws java.lang.Exception
Specified by:
removeProducer in interface ServerSession
Throws:
java.lang.Exception

handleDelivery

public void handleDelivery(MessageReference ref,
                           ServerConsumer consumer)
                    throws java.lang.Exception
Specified by:
handleDelivery in interface ServerSession
Throws:
java.lang.Exception

setStarted

public void setStarted(boolean s)
                throws java.lang.Exception
Specified by:
setStarted in interface ServerSession
Throws:
java.lang.Exception

close

public void close()
           throws java.lang.Exception
Specified by:
close in interface ServerSession
Throws:
java.lang.Exception

promptDelivery

public void promptDelivery(Queue queue)
Specified by:
promptDelivery in interface ServerSession

send

public void send(ServerMessage msg)
          throws java.lang.Exception
Specified by:
send in interface ServerSession
Throws:
java.lang.Exception

acknowledge

public void acknowledge(long deliveryID,
                        boolean allUpTo)
                 throws java.lang.Exception
Specified by:
acknowledge in interface ServerSession
Throws:
java.lang.Exception

rollback

public void rollback()
              throws java.lang.Exception
Specified by:
rollback in interface ServerSession
Throws:
java.lang.Exception

cancel

public void cancel(long deliveryID,
                   boolean expired)
            throws java.lang.Exception
Specified by:
cancel in interface ServerSession
Throws:
java.lang.Exception

commit

public void commit()
            throws java.lang.Exception
Specified by:
commit in interface ServerSession
Throws:
java.lang.Exception

XACommit

public SessionXAResponseMessage XACommit(boolean onePhase,
                                         javax.transaction.xa.Xid xid)
                                  throws java.lang.Exception
Specified by:
XACommit in interface ServerSession
Throws:
java.lang.Exception

XAEnd

public SessionXAResponseMessage XAEnd(javax.transaction.xa.Xid xid,
                                      boolean failed)
                               throws java.lang.Exception
Specified by:
XAEnd in interface ServerSession
Throws:
java.lang.Exception

XAForget

public SessionXAResponseMessage XAForget(javax.transaction.xa.Xid xid)
Specified by:
XAForget in interface ServerSession

XAJoin

public SessionXAResponseMessage XAJoin(javax.transaction.xa.Xid xid)
                                throws java.lang.Exception
Specified by:
XAJoin in interface ServerSession
Throws:
java.lang.Exception

XAPrepare

public SessionXAResponseMessage XAPrepare(javax.transaction.xa.Xid xid)
                                   throws java.lang.Exception
Specified by:
XAPrepare in interface ServerSession
Throws:
java.lang.Exception

XAResume

public SessionXAResponseMessage XAResume(javax.transaction.xa.Xid xid)
                                  throws java.lang.Exception
Specified by:
XAResume in interface ServerSession
Throws:
java.lang.Exception

XARollback

public SessionXAResponseMessage XARollback(javax.transaction.xa.Xid xid)
                                    throws java.lang.Exception
Specified by:
XARollback in interface ServerSession
Throws:
java.lang.Exception

XAStart

public SessionXAResponseMessage XAStart(javax.transaction.xa.Xid xid)
Specified by:
XAStart in interface ServerSession

XASuspend

public SessionXAResponseMessage XASuspend()
                                   throws java.lang.Exception
Specified by:
XASuspend in interface ServerSession
Throws:
java.lang.Exception

getInDoubtXids

public java.util.List<javax.transaction.xa.Xid> getInDoubtXids()
                                                        throws java.lang.Exception
Specified by:
getInDoubtXids in interface ServerSession
Throws:
java.lang.Exception

getXATimeout

public int getXATimeout()
Specified by:
getXATimeout in interface ServerSession

setXATimeout

public boolean setXATimeout(int timeoutSeconds)
Specified by:
setXATimeout in interface ServerSession

addDestination

public void addDestination(SimpleString address,
                           boolean temporary)
                    throws java.lang.Exception
Specified by:
addDestination in interface ServerSession
Throws:
java.lang.Exception

removeDestination

public void removeDestination(SimpleString address,
                              boolean temporary)
                       throws java.lang.Exception
Specified by:
removeDestination in interface ServerSession
Throws:
java.lang.Exception

createQueue

public void createQueue(SimpleString address,
                        SimpleString queueName,
                        SimpleString filterString,
                        boolean durable,
                        boolean temporary)
                 throws java.lang.Exception
Specified by:
createQueue in interface ServerSession
Throws:
java.lang.Exception

deleteQueue

public void deleteQueue(SimpleString queueName)
                 throws java.lang.Exception
Specified by:
deleteQueue in interface ServerSession
Throws:
java.lang.Exception

createConsumer

public SessionCreateConsumerResponseMessage createConsumer(long clientTargetID,
                                                           SimpleString queueName,
                                                           SimpleString filterString,
                                                           boolean noLocal,
                                                           boolean autoDeleteQueue,
                                                           int windowSize,
                                                           int maxRate)
                                                    throws java.lang.Exception
Specified by:
createConsumer in interface ServerSession
Throws:
java.lang.Exception

executeQueueQuery

public SessionQueueQueryResponseMessage executeQueueQuery(SessionQueueQueryMessage request)
                                                   throws java.lang.Exception
Specified by:
executeQueueQuery in interface ServerSession
Throws:
java.lang.Exception

executeBindingQuery

public SessionBindingQueryResponseMessage executeBindingQuery(SessionBindingQueryMessage request)
                                                       throws java.lang.Exception
Specified by:
executeBindingQuery in interface ServerSession
Throws:
java.lang.Exception

createBrowser

public SessionCreateBrowserResponseMessage createBrowser(SimpleString queueName,
                                                         SimpleString filterString)
                                                  throws java.lang.Exception
Specified by:
createBrowser in interface ServerSession
Throws:
java.lang.Exception

createProducer

public SessionCreateProducerResponseMessage createProducer(long clientTargetID,
                                                           SimpleString address,
                                                           int windowSize,
                                                           int maxRate)
                                                    throws java.lang.Exception
Create a producer for the specified address

Specified by:
createProducer in interface ServerSession
Parameters:
address - The address to produce too
windowSize - - the producer window size to use for flow control. Specify -1 to disable flow control completely The actual window size used may be less than the specified window size if it is overridden by any producer-window-size specified on the queue
Throws:
java.lang.Exception

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2006 JBoss Inc. All Rights Reserved.