Class BaseUIMAAsynchronousEngineCommon_impl.SharedConnection
- java.lang.Object
-
- org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngineCommon_impl.SharedConnection
-
- Enclosing class:
- BaseUIMAAsynchronousEngineCommon_impl
public static class BaseUIMAAsynchronousEngineCommon_impl.SharedConnection extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BaseUIMAAsynchronousEngineCommon_impl.SharedConnection.ConnectionState
-
Constructor Summary
Constructors Constructor Description SharedConnection(javax.jms.ConnectionFactory connectionFactory, java.lang.String brokerURL)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
create()
Using jndi context look the connection factory and attempt to create broker connection.boolean
destroy()
This method is called from stop().java.lang.String
getBroker()
int
getClientCount()
javax.jms.Connection
getConnection()
BaseUIMAAsynchronousEngineCommon_impl.SharedConnection.ConnectionState
getState()
boolean
isConnectionValid()
boolean
isOpen()
void
registerClient(BaseUIMAAsynchronousEngineCommon_impl client)
void
retryConnectionUntilSuccessfull()
void
setConnection(javax.jms.Connection connection)
void
setConnectionValidator(ConnectionValidator validator)
void
start()
void
unregisterClient(BaseUIMAAsynchronousEngineCommon_impl client)
-
-
-
Method Detail
-
getBroker
public java.lang.String getBroker()
-
setConnectionValidator
public void setConnectionValidator(ConnectionValidator validator)
-
isOpen
public boolean isOpen()
-
isConnectionValid
public boolean isConnectionValid()
-
create
public void create() throws java.lang.Exception
Using jndi context look the connection factory and attempt to create broker connection. Throws exception if not successfull.- Throws:
java.lang.Exception
-
retryConnectionUntilSuccessfull
public void retryConnectionUntilSuccessfull()
-
start
public void start() throws java.lang.Exception
- Throws:
java.lang.Exception
-
getState
public BaseUIMAAsynchronousEngineCommon_impl.SharedConnection.ConnectionState getState()
-
getConnection
public javax.jms.Connection getConnection()
-
setConnection
public void setConnection(javax.jms.Connection connection)
-
registerClient
public void registerClient(BaseUIMAAsynchronousEngineCommon_impl client)
-
unregisterClient
public void unregisterClient(BaseUIMAAsynchronousEngineCommon_impl client)
-
getClientCount
public int getClientCount()
-
destroy
public boolean destroy()
This method is called from stop(). It will stop the shared connection if all of the clients have already terminated- Returns:
-
-