Package org.apache.uima.adapter.vinci
Class VinciBinaryAnalysisEngineService_impl
- java.lang.Object
-
- org.apache.vinci.transport.VinciServableAdapter
-
- org.apache.uima.adapter.vinci.VinciBinaryAnalysisEngineService_impl
-
- All Implemented Interfaces:
TransportableFactory
,VinciServable
public class VinciBinaryAnalysisEngineService_impl extends VinciServableAdapter
Main class for a Vinci Analysis Engine service that uses the binary CAS serialization, rather than XCAS. This class can also be used to deploy CAS Consumers as Vinci Services. The main method takes one argument - the path to the service deployment descriptor.
-
-
Constructor Summary
Constructors Constructor Description VinciBinaryAnalysisEngineService_impl(java.lang.String serviceConfigPath)
Instantiate Analysis Engine from a given descriptor.VinciBinaryAnalysisEngineService_impl(java.lang.String serviceConfigPath, boolean debug)
Instantiate Analysis Engine from a given descriptor - possibly in debug mode.VinciBinaryAnalysisEngineService_impl(java.lang.String serviceConfigPath, boolean debug, java.lang.String instanceId)
Instantiate Analysis Engine from a given descriptor - possibly in debug mode.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Transportable
eval(Transportable doc)
Main method called by the Vinci Service Layer.Descriptor
getDescriptor()
static void
main(java.lang.String[] args)
Transportable
makeTransportable()
Creates a new (empty) document of the desired type.protected void
start()
Starts this service and associates a ShutdownHook to handle gracefull shutdown.void
stop()
Terminate this service-
Methods inherited from class org.apache.vinci.transport.VinciServableAdapter
cleanExit
-
-
-
-
Constructor Detail
-
VinciBinaryAnalysisEngineService_impl
public VinciBinaryAnalysisEngineService_impl(java.lang.String serviceConfigPath, boolean debug, java.lang.String instanceId) throws java.lang.Exception
Instantiate Analysis Engine from a given descriptor - possibly in debug mode.- Parameters:
serviceConfigPath
- descriptor locationdebug
-instanceId
-- Throws:
java.lang.Exception
-
VinciBinaryAnalysisEngineService_impl
public VinciBinaryAnalysisEngineService_impl(java.lang.String serviceConfigPath, boolean debug) throws java.lang.Exception
Instantiate Analysis Engine from a given descriptor - possibly in debug mode.- Parameters:
serviceConfigPath
- descriptor locationdebug
-- Throws:
java.lang.Exception
-
VinciBinaryAnalysisEngineService_impl
public VinciBinaryAnalysisEngineService_impl(java.lang.String serviceConfigPath) throws java.lang.Exception
Instantiate Analysis Engine from a given descriptor.- Parameters:
serviceConfigPath
- descriptor location- Throws:
java.lang.Exception
-
-
Method Detail
-
getDescriptor
public Descriptor getDescriptor()
-
eval
public Transportable eval(Transportable doc) throws ServiceException
Main method called by the Vinci Service Layer. All requests coming in from clients go through this method. Each request comes in as a VinciFrame and is expected to contain a valid VINCI:COMMAND. Currently, two such operations are supported: 1) Annotate - triggers document analysis 2) GetData - triggers return of the AE meta data ( descriptor)- Specified by:
eval
in interfaceVinciServable
- Specified by:
eval
in classVinciServableAdapter
- Parameters:
doc
-Transportable
- a VinciFrame containing client request- Returns:
Transportable
- a VinciFrame containg result of performing the service- Throws:
ServiceException
- thrown when there is an application level error that should result in the client receiving the same ServiceException on the other end.
-
start
protected void start()
Starts this service and associates a ShutdownHook to handle gracefull shutdown.
-
stop
public void stop()
Terminate this service
-
main
public static void main(java.lang.String[] args)
-
makeTransportable
public Transportable makeTransportable()
Description copied from interface:TransportableFactory
Creates a new (empty) document of the desired type.- Specified by:
makeTransportable
in interfaceTransportableFactory
- Overrides:
makeTransportable
in classVinciServableAdapter
- Returns:
- The new document.
- See Also:
TransportableFactory.makeTransportable()
-
-