public interface ClientSessionFactory extends AutoCloseable
| Modifier and Type | Method and Description |
|---|---|
void |
addFailoverListener(FailoverEventListener listener)
Adds a FailoverEventListener to the session which is notified if a failover event occurs on the session.
|
void |
cleanup()
Opposed to close, will call cleanup only on every created session and children objects.
|
void |
close()
Closes this factory and any session created by it.
|
ClientSession |
createSession()
Creates a non-transacted session.
|
ClientSession |
createSession(boolean autoCommitSends,
boolean autoCommitAcks)
Creates a session.
|
ClientSession |
createSession(boolean xa,
boolean autoCommitSends,
boolean autoCommitAcks)
Creates a session.
|
ClientSession |
createSession(boolean xa,
boolean autoCommitSends,
boolean autoCommitAcks,
boolean preAcknowledge)
Creates a session.
|
ClientSession |
createSession(boolean autoCommitSends,
boolean autoCommitAcks,
int ackBatchSize)
Creates a session.
|
ClientSession |
createSession(String username,
String password,
boolean xa,
boolean autoCommitSends,
boolean autoCommitAcks,
boolean preAcknowledge,
int ackBatchSize)
Creates an authenticated session.
|
ClientSession |
createTransactedSession()
Creates a transacted session.
|
ClientSession |
createXASession()
Creates a session with XA transaction semantics.
|
CoreRemotingConnection |
getConnection()
Returns the code connection used by this session factory.
|
ServerLocator |
getServerLocator() |
boolean |
isClosed() |
boolean |
removeFailoverListener(FailoverEventListener listener)
Removes a FailoverEventListener to the session.
|
ClientSession createXASession() throws HornetQException
HornetQException - if an exception occurs while creating the sessionClientSession createTransactedSession() throws HornetQException
HornetQException - if an exception occurs while creating the sessionClientSession.commit()ClientSession createSession() throws HornetQException
HornetQException - if an exception occurs while creating the sessionClientSession createSession(boolean autoCommitSends, boolean autoCommitAcks) throws HornetQException
autoCommitSends - true to automatically commit message sends, false to commit manuallyautoCommitAcks - true to automatically commit message acknowledgement, false to commit manuallyHornetQException - if an exception occurs while creating the sessionClientSession createSession(boolean autoCommitSends, boolean autoCommitAcks, int ackBatchSize) throws HornetQException
autoCommitSends - true to automatically commit message sends, false to commit manuallyautoCommitAcks - true to automatically commit message acknowledgement, false to commit manuallyackBatchSize - the batch size of the acknowledgementsHornetQException - if an exception occurs while creating the sessionClientSession createSession(boolean xa, boolean autoCommitSends, boolean autoCommitAcks) throws HornetQException
xa - whether the session support XA transaction semantic or notautoCommitSends - true to automatically commit message sends, false to commit manuallyautoCommitAcks - true to automatically commit message acknowledgement, false to commit manuallyHornetQException - if an exception occurs while creating the sessionClientSession createSession(boolean xa, boolean autoCommitSends, boolean autoCommitAcks, boolean preAcknowledge) throws HornetQException
xa - whether the session support XA transaction semantic or notautoCommitSends - true to automatically commit message sends, false to commit manuallyautoCommitAcks - true to automatically commit message acknowledgement, false to commit manuallypreAcknowledge - true to pre-acknowledge messages on the server, false to let the client acknowledge the messagesHornetQException - if an exception occurs while creating the sessionClientSession createSession(String username, String password, boolean xa, boolean autoCommitSends, boolean autoCommitAcks, boolean preAcknowledge, int ackBatchSize) throws HornetQException
username - the user namepassword - the user passwordxa - whether the session support XA transaction semantic or notautoCommitSends - true to automatically commit message sends, false to commit manuallyautoCommitAcks - true to automatically commit message acknowledgement, false to commit manuallypreAcknowledge - true to pre-acknowledge messages on the server, false to let the client acknowledge the messagesHornetQException - if an exception occurs while creating the sessionvoid close()
close in interface AutoCloseableboolean isClosed()
true if the factory is closed, false otherwise.void addFailoverListener(FailoverEventListener listener)
listener - the listener to addboolean removeFailoverListener(FailoverEventListener listener)
listener - the listener to removetrue if the listener was removed, false elsevoid cleanup()
ServerLocator getServerLocator()
CoreRemotingConnection getConnection()
Copyright © 2013 JBoss, a division of Red Hat. All rights reserved.