public final class ProcessorServiceAppImpl extends MetadataServiceAppImpl implements ServiceThread.Target, Processor
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_NAME
Default processor name.
|
static ClassDef |
DEFAULT_RECEPTIONIST_CLASS_DEF
Default receptionist class.
|
static String |
NAME_PROPERTY
Name property.
|
static String |
PROCESSOR_PROPERTIES
Processor properties.
|
static String |
RECEPTIONIST_CLASS_PROPERTY
Used to specify an alternative to the SOM receptionist.
|
SERVICE_APP_PROPERTIES| Constructor and Description |
|---|
ProcessorServiceAppImpl() |
| Modifier and Type | Method and Description |
|---|---|
ServiceStats |
createStats(StatsOwner statsOwner)
Creates a stats instance.
|
Optional<String> |
getEntityName()
Gets the entity name.
|
boolean |
onNewMetadata(Metadata metadata)
Called on new metadata.
|
void |
onServicesNotReady()
Called when some services are not ready.
|
Optional<Collection<PointValue>> |
process(Collection<PointValue> pointValues)
Processes point values.
|
void |
run()
Runs.
|
boolean |
setUp(MetadataService service)
Sets up the application.
|
void |
start()
Starts the application.
|
void |
stop()
Stops the application.
|
void |
tearDown()
Tears down the application.
|
getMetadata, getService, loadMetadata, setUpfail, getConfig, getConfigProperties, getDataDir, getJoinTimeout, getProperties, getSourceUUID, getThisLogger, getTimer, onAlert, onEvent, onServiceNotAvailableException, onServicesReady, onSignalclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitonAlert, onEvent, onServicesReady, onSignalpublic static final String DEFAULT_NAME
public static final String NAME_PROPERTY
public static final String PROCESSOR_PROPERTIES
public static final ClassDef DEFAULT_RECEPTIONIST_CLASS_DEF
public static final String RECEPTIONIST_CLASS_PROPERTY
public ServiceStats createStats(StatsOwner statsOwner)
createStats in interface ServiceAppcreateStats in class ServiceAppImplstatsOwner - The stats owner.public Optional<String> getEntityName()
getEntityName in interface MetadataServiceAppgetEntityName in class MetadataServiceAppImplpublic boolean onNewMetadata(Metadata metadata)
Overidden as needed.
Called by the framework and by overriding classes at the end of the override.
onNewMetadata in interface MetadataServiceApponNewMetadata in class MetadataServiceAppImplmetadata - The new metadata.public void onServicesNotReady()
This is called by the pending actions processing when it not known if all registered services are ready. This may be used by a service thread to trigger some state refresh when the pending actions processing is completed; at that time, all the registered services will be ready.
onServicesNotReady in interface ServiceApponServicesNotReady in class ServiceAppImplpublic Optional<Collection<PointValue>> process(Collection<PointValue> pointValues) throws InterruptedException, ServiceNotAvailableException
process in interface ProcessorpointValues - The input point values.InterruptedException - When the service is stopped.ServiceNotAvailableException - When the service is not available.public void run()
throws InterruptedException
Similar to same in Runnable but may throw exceptions.
run in interface ServiceThread.TargetInterruptedExceptionpublic boolean setUp(MetadataService service)
Overidden as needed.
Called by the framework and by overriding classes at the beginning of the override.
setUp in interface MetadataServiceAppsetUp in class MetadataServiceAppImplservice - The service holding this application.public void start()
Overidden as needed by the application.
Called by the framework.
Should return only when the application is started.
start in interface ServiceAppstart in class ServiceAppImplpublic void stop()
Overidden as needed by the application.
Called by the framework.
stop in interface ServiceAppstop in class ServiceAppImplpublic void tearDown()
Overidden as needed by the application.
Called by the framework and by overriding classes at the end of the override.
tearDown in interface ServiceApptearDown in class ServiceAppImplCopyright © 2003-2019 Serge Brisson. All Rights Reserved.