Class VmTransport
- java.lang.Object
-
- org.apache.uima.aae.spi.transport.vm.VmTransport
-
- All Implemented Interfaces:
UimaTransport
public class VmTransport extends java.lang.Object implements UimaTransport
This class provides implementation for internal messaging between collocated Uima AS services. It usesUimaMessageDispatcherto send messages toUimaMessageListener.
-
-
Constructor Summary
Constructors Constructor Description VmTransport(UimaAsContext aContext, AnalysisEngineController aController)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSpiListener(SpiListener listener)This method registers a givenSpiListenerinstance with the SPI.voiddestroy()protected java.util.concurrent.ThreadPoolExecutorgetExecutorInstance()UimaMessageDispatchergetMessageDispatcher()UimaMessageDispatchergetUimaMessageDispatcher()Returns SPI DispatcherUimaMessageDispatchergetUimaMessageDispatcher(java.lang.String aKey)UimaMessageListenergetUimaMessageListener()UimaVmMessageproduceMessage()UimaVmMessageproduceMessage(int aCommand, int aMessageType, java.lang.String aMessageFrom)UimaVmMessageDispatcherproduceUimaMessageDispatcher(UimaTransport aTransport)UimaMessageListenerproduceUimaMessageListener()voidregisterWithJMX(AnalysisEngineController aController, java.lang.String queueKind)voidstartIt()This method is called to start SPI.voidstopIt()This method is called to stop SPI.
-
-
-
Constructor Detail
-
VmTransport
public VmTransport(UimaAsContext aContext, AnalysisEngineController aController)
-
-
Method Detail
-
addSpiListener
public void addSpiListener(SpiListener listener)
Description copied from interface:UimaTransportThis method registers a givenSpiListenerinstance with the SPI. The SPI will call all registered listeners when the initialization is completed, when the start is completed, and when the stop is completed.- Specified by:
addSpiListenerin interfaceUimaTransport- Parameters:
listener- - SPI listener to receive events
-
produceMessage
public UimaVmMessage produceMessage()
- Specified by:
produceMessagein interfaceUimaTransport
-
produceMessage
public UimaVmMessage produceMessage(int aCommand, int aMessageType, java.lang.String aMessageFrom)
- Specified by:
produceMessagein interfaceUimaTransport
-
startIt
public void startIt() throws UimaSpiExceptionDescription copied from interface:UimaTransportThis method is called to start SPI.- Specified by:
startItin interfaceUimaTransport- Throws:
UimaSpiException- - any problems while starting the SPI
-
stopIt
public void stopIt() throws UimaSpiExceptionDescription copied from interface:UimaTransportThis method is called to stop SPI.- Specified by:
stopItin interfaceUimaTransport- Throws:
UimaSpiException- - any problems while stopping the SPI
-
destroy
public void destroy()
-
getExecutorInstance
protected java.util.concurrent.ThreadPoolExecutor getExecutorInstance()
-
registerWithJMX
public void registerWithJMX(AnalysisEngineController aController, java.lang.String queueKind)
- Specified by:
registerWithJMXin interfaceUimaTransport
-
getMessageDispatcher
public UimaMessageDispatcher getMessageDispatcher() throws UimaSpiException
- Throws:
UimaSpiException
-
getUimaMessageListener
public UimaMessageListener getUimaMessageListener()
- Specified by:
getUimaMessageListenerin interfaceUimaTransport
-
produceUimaMessageListener
public UimaMessageListener produceUimaMessageListener() throws UimaSpiException
- Specified by:
produceUimaMessageListenerin interfaceUimaTransport- Throws:
UimaSpiException
-
getUimaMessageDispatcher
public UimaMessageDispatcher getUimaMessageDispatcher() throws UimaSpiException
Description copied from interface:UimaTransportReturns SPI Dispatcher- Specified by:
getUimaMessageDispatcherin interfaceUimaTransport- Returns:
- - instance of SPI Dispatcher
- Throws:
UimaSpiException- - any problems while fetching Dispatcher
-
getUimaMessageDispatcher
public UimaMessageDispatcher getUimaMessageDispatcher(java.lang.String aKey) throws UimaSpiException
- Specified by:
getUimaMessageDispatcherin interfaceUimaTransport- Throws:
UimaSpiException
-
produceUimaMessageDispatcher
public UimaVmMessageDispatcher produceUimaMessageDispatcher(UimaTransport aTransport) throws UimaSpiException
- Specified by:
produceUimaMessageDispatcherin interfaceUimaTransport- Throws:
UimaSpiException
-
-