org.apache.uima.adapter.jms.client
Class BaseUIMAAsynchronousEngineCommon_impl.SharedConnection

java.lang.Object
  extended by 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
static class BaseUIMAAsynchronousEngineCommon_impl.SharedConnection.ConnectionState
           
 
Constructor Summary
BaseUIMAAsynchronousEngineCommon_impl.SharedConnection(javax.jms.ConnectionFactory connectionFactory, java.lang.String brokerURL)
           
 
Method Summary
 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseUIMAAsynchronousEngineCommon_impl.SharedConnection

public BaseUIMAAsynchronousEngineCommon_impl.SharedConnection(javax.jms.ConnectionFactory connectionFactory,
                                                              java.lang.String brokerURL)
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:


Copyright © 2012. All Rights Reserved.