org.apache.uima.aae.spi.transport.vm
Class VmTransport

java.lang.Object
  extended by 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 uses UimaMessageDispatcher to send messages to UimaMessageListener.


Constructor Summary
VmTransport(UimaAsContext aContext, AnalysisEngineController aController)
           
 
Method Summary
 void addSpiListener(SpiListener listener)
          This method registers a given SpiListener instance with the SPI.
 void destroy()
           
protected  java.util.concurrent.ThreadPoolExecutor getExecutorInstance()
           
 UimaMessageDispatcher getMessageDispatcher()
           
 UimaMessageDispatcher getUimaMessageDispatcher()
          Returns SPI Dispatcher
 UimaMessageDispatcher 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 given SpiListener 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 interface UimaTransport
Parameters:
listener - - SPI listener to receive events

produceMessage

public UimaVmMessage produceMessage()
Specified by:
produceMessage in interface UimaTransport

produceMessage

public UimaVmMessage produceMessage(int aCommand,
                                    int aMessageType,
                                    java.lang.String aMessageFrom)
Specified by:
produceMessage in interface UimaTransport

startIt

public void startIt()
             throws UimaSpiException
Description copied from interface: UimaTransport
This method is called to start SPI.

Specified by:
startIt in interface UimaTransport
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 interface UimaTransport
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 interface UimaTransport

getMessageDispatcher

public UimaMessageDispatcher getMessageDispatcher()
                                           throws UimaSpiException
Throws:
UimaSpiException

getUimaMessageListener

public UimaMessageListener getUimaMessageListener()
Specified by:
getUimaMessageListener in interface UimaTransport

produceUimaMessageListener

public UimaMessageListener produceUimaMessageListener()
                                               throws UimaSpiException
Specified by:
produceUimaMessageListener in interface UimaTransport
Throws:
UimaSpiException

getUimaMessageDispatcher

public UimaMessageDispatcher getUimaMessageDispatcher()
                                               throws UimaSpiException
Description copied from interface: UimaTransport
Returns SPI Dispatcher

Specified by:
getUimaMessageDispatcher in interface UimaTransport
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 interface UimaTransport
Throws:
UimaSpiException

produceUimaMessageDispatcher

public UimaVmMessageDispatcher produceUimaMessageDispatcher(UimaTransport aTransport)
                                                     throws UimaSpiException
Specified by:
produceUimaMessageDispatcher in interface UimaTransport
Throws:
UimaSpiException


Copyright © 2011. All Rights Reserved.