@Service
@Properties(value={@Property(name="service.ranking",intValue=0),@Property(name="stanbol.maxEnhancementJobWaitTime",intValue=60000)})
public class EventJobManagerImpl
extends Object
implements org.apache.stanbol.enhancer.servicesapi.EnhancementJobManager
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.stanbol.enhancer.servicesapi.ChainManager |
chainManager |
static int |
DEFAULT_MAX_ENHANCEMENT_JOB_WAIT_TIME
default max wait time is 60sec (similar to the http timeout)
|
static int |
DEFAULT_SERVICE_RANKING |
protected org.apache.stanbol.enhancer.servicesapi.EnhancementEngineManager |
engineManager |
protected org.osgi.service.event.EventAdmin |
eventAdmin |
static String |
MAX_ENHANCEMENT_JOB_WAIT_TIME |
protected org.apache.clerezza.rdf.core.serializedform.Serializer |
serializer
If available it is used for logging ExecutionMetadata of failed or
timed out Enhancement Requests (OPTIONAL)
|
| Constructor and Description |
|---|
EventJobManagerImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
activate(org.osgi.service.component.ComponentContext ctx)
Instantiates and registers the
EnhancementJobHandler as
EventHandler for the topic
Constants.TOPIC_JOB_MANAGER |
protected void |
deactivate(org.osgi.service.component.ComponentContext ctx)
Unregisters the
EnhancementJobHandler |
void |
enhanceContent(org.apache.stanbol.enhancer.servicesapi.ContentItem ci) |
void |
enhanceContent(org.apache.stanbol.enhancer.servicesapi.ContentItem ci,
org.apache.stanbol.enhancer.servicesapi.Chain chain) |
List<org.apache.stanbol.enhancer.servicesapi.EnhancementEngine> |
getActiveEngines() |
protected void |
logExecutionMetadata(EnhancementJob job)
Logs the ExecutionMetadata
|
public static final int DEFAULT_SERVICE_RANKING
public static final String MAX_ENHANCEMENT_JOB_WAIT_TIME
public static final int DEFAULT_MAX_ENHANCEMENT_JOB_WAIT_TIME
@Reference protected org.apache.stanbol.enhancer.servicesapi.ChainManager chainManager
@Reference protected org.apache.stanbol.enhancer.servicesapi.EnhancementEngineManager engineManager
@Reference protected org.osgi.service.event.EventAdmin eventAdmin
@Reference(cardinality=OPTIONAL_UNARY) protected org.apache.clerezza.rdf.core.serializedform.Serializer serializer
@Activate protected void activate(org.osgi.service.component.ComponentContext ctx)
EnhancementJobHandler as
EventHandler for the topic
Constants.TOPIC_JOB_MANAGERctx - @Deactivate protected void deactivate(org.osgi.service.component.ComponentContext ctx)
EnhancementJobHandlerctx - public void enhanceContent(org.apache.stanbol.enhancer.servicesapi.ContentItem ci)
throws org.apache.stanbol.enhancer.servicesapi.EngineException,
org.apache.stanbol.enhancer.servicesapi.ChainException
enhanceContent in interface org.apache.stanbol.enhancer.servicesapi.EnhancementJobManagerorg.apache.stanbol.enhancer.servicesapi.EngineExceptionorg.apache.stanbol.enhancer.servicesapi.ChainExceptionpublic void enhanceContent(org.apache.stanbol.enhancer.servicesapi.ContentItem ci,
org.apache.stanbol.enhancer.servicesapi.Chain chain)
throws org.apache.stanbol.enhancer.servicesapi.EngineException,
org.apache.stanbol.enhancer.servicesapi.ChainException
enhanceContent in interface org.apache.stanbol.enhancer.servicesapi.EnhancementJobManagerorg.apache.stanbol.enhancer.servicesapi.EngineExceptionorg.apache.stanbol.enhancer.servicesapi.ChainExceptionprotected void logExecutionMetadata(EnhancementJob job)
job - public List<org.apache.stanbol.enhancer.servicesapi.EnhancementEngine> getActiveEngines()
getActiveEngines in interface org.apache.stanbol.enhancer.servicesapi.EnhancementJobManagerCopyright © 2012-2014 The Apache Software Foundation. All Rights Reserved.