|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ClientSessionFactory
A ClientSessionFactory is the entry point to create and configure HornetQ resources to produce and consume messages.
It is possible to configure a factory using the setter methods only if no session has been created.
Once a session is created, the configuration is fixed and any call to a setter method will throw a IllegalStateException.
Method Summary | |
---|---|
void |
cleanup()
Opposed to close, will call cleanup only on every created session and children objects. |
void |
close()
|
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. |
org.hornetq.core.protocol.core.CoreRemotingConnection |
getConnection()
|
ServerLocator |
getServerLocator()
|
boolean |
isClosed()
|
Method Detail |
---|
ClientSession createXASession() throws org.hornetq.api.core.HornetQException
org.hornetq.api.core.HornetQException
- if an exception occurs while creating the sessionClientSession createTransactedSession() throws org.hornetq.api.core.HornetQException
org.hornetq.api.core.HornetQException
- if an exception occurs while creating the sessionClientSession.commit()
ClientSession createSession() throws org.hornetq.api.core.HornetQException
org.hornetq.api.core.HornetQException
- if an exception occurs while creating the sessionClientSession createSession(boolean autoCommitSends, boolean autoCommitAcks) throws org.hornetq.api.core.HornetQException
autoCommitSends
- true
to automatically commit message sends, false
to commit manuallyautoCommitAcks
- true
to automatically commit message acknowledgement, false
to commit manually
org.hornetq.api.core.HornetQException
- if an exception occurs while creating the sessionClientSession createSession(boolean autoCommitSends, boolean autoCommitAcks, int ackBatchSize) throws org.hornetq.api.core.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 acknowledgements
org.hornetq.api.core.HornetQException
- if an exception occurs while creating the sessionClientSession createSession(boolean xa, boolean autoCommitSends, boolean autoCommitAcks) throws org.hornetq.api.core.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 manually
org.hornetq.api.core.HornetQException
- if an exception occurs while creating the sessionClientSession createSession(boolean xa, boolean autoCommitSends, boolean autoCommitAcks, boolean preAcknowledge) throws org.hornetq.api.core.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 messages
org.hornetq.api.core.HornetQException
- if an exception occurs while creating the sessionClientSession createSession(String username, String password, boolean xa, boolean autoCommitSends, boolean autoCommitAcks, boolean preAcknowledge, int ackBatchSize) throws org.hornetq.api.core.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 messages
org.hornetq.api.core.HornetQException
- if an exception occurs while creating the sessionvoid close()
void cleanup()
ServerLocator getServerLocator()
org.hornetq.core.protocol.core.CoreRemotingConnection getConnection()
boolean isClosed()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |