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 usesUimaMessageDispatcher
to 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 void
addSpiListener(SpiListener listener)
This method registers a givenSpiListener
instance with the SPI.void
destroy()
protected java.util.concurrent.ThreadPoolExecutor
getExecutorInstance()
UimaMessageDispatcher
getMessageDispatcher()
UimaMessageDispatcher
getUimaMessageDispatcher()
Returns SPI DispatcherUimaMessageDispatcher
getUimaMessageDispatcher(java.lang.String aKey)
UimaMessageListener
getUimaMessageListener()
UimaVmMessage
produceMessage()
UimaVmMessage
produceMessage(int aCommand, int aMessageType, java.lang.String aMessageFrom)
UimaVmMessageDispatcher
produceUimaMessageDispatcher(UimaTransport aTransport)
UimaMessageListener
produceUimaMessageListener()
void
registerWithJMX(AnalysisEngineController aController, java.lang.String queueKind)
void
startIt()
This method is called to start SPI.void
stopIt()
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:UimaTransport
This method registers a givenSpiListener
instance 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:
addSpiListener
in interfaceUimaTransport
- Parameters:
listener
- - SPI listener to receive events
-
produceMessage
public UimaVmMessage produceMessage()
- Specified by:
produceMessage
in interfaceUimaTransport
-
produceMessage
public UimaVmMessage produceMessage(int aCommand, int aMessageType, java.lang.String aMessageFrom)
- Specified by:
produceMessage
in interfaceUimaTransport
-
startIt
public void startIt() throws UimaSpiException
Description copied from interface:UimaTransport
This method is called to start SPI.- Specified by:
startIt
in interfaceUimaTransport
- Throws:
UimaSpiException
- - any problems while starting the SPI
-
stopIt
public void stopIt() throws UimaSpiException
Description copied from interface:UimaTransport
This method is called to stop SPI.- Specified by:
stopIt
in 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:
registerWithJMX
in interfaceUimaTransport
-
getMessageDispatcher
public UimaMessageDispatcher getMessageDispatcher() throws UimaSpiException
- Throws:
UimaSpiException
-
getUimaMessageListener
public UimaMessageListener getUimaMessageListener()
- Specified by:
getUimaMessageListener
in interfaceUimaTransport
-
produceUimaMessageListener
public UimaMessageListener produceUimaMessageListener() throws UimaSpiException
- Specified by:
produceUimaMessageListener
in interfaceUimaTransport
- Throws:
UimaSpiException
-
getUimaMessageDispatcher
public UimaMessageDispatcher getUimaMessageDispatcher() throws UimaSpiException
Description copied from interface:UimaTransport
Returns SPI Dispatcher- Specified by:
getUimaMessageDispatcher
in 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:
getUimaMessageDispatcher
in interfaceUimaTransport
- Throws:
UimaSpiException
-
produceUimaMessageDispatcher
public UimaVmMessageDispatcher produceUimaMessageDispatcher(UimaTransport aTransport) throws UimaSpiException
- Specified by:
produceUimaMessageDispatcher
in interfaceUimaTransport
- Throws:
UimaSpiException
-
-