public final class EvaluatorContext extends Object implements ActiveContext
Constructor and Description |
---|
EvaluatorContext(String contextIdentifier,
String evaluatorIdentifier,
EvaluatorDescriptor evaluatorDescriptor,
Optional<String> parentID,
ConfigurationSerializer configurationSerializer,
ContextControlHandler contextControlHandler,
EvaluatorMessageDispatcher messageDispatcher,
ExceptionCodec exceptionCodec,
ContextRepresenters contextRepresenters) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
ClosedContext |
getClosedContext(ActiveContext parentContext) |
EvaluatorDescriptor |
getEvaluatorDescriptor() |
String |
getEvaluatorId() |
FailedContext |
getFailedContext(ContextStatusPOJO contextStatus) |
FailedContext |
getFailedContextForEvaluatorFailure() |
String |
getId()
Returns an identifier of this object.
|
Optional<String> |
getParentId() |
boolean |
isRootContext() |
void |
sendMessage(byte[] message)
Send the active context the message, which will be delivered to all registered
ContextMessageHandler , for this context. |
void |
submitContext(Configuration contextConfiguration)
Submit a Context.
|
void |
submitContext(String contextConf) |
void |
submitContextAndService(Configuration contextConfiguration,
Configuration serviceConfiguration)
Submit a Context and a Service Configuration.
|
void |
submitContextAndService(String contextConf,
Optional<String> serviceConf) |
void |
submitContextAndService(String contextConf,
String serviceConf) |
void |
submitTask(Configuration taskConf)
Submits a Task (encoded in the Configuration) for execution.
|
void |
submitTask(String taskConf) |
String |
toString() |
public EvaluatorContext(String contextIdentifier, String evaluatorIdentifier, EvaluatorDescriptor evaluatorDescriptor, Optional<String> parentID, ConfigurationSerializer configurationSerializer, ContextControlHandler contextControlHandler, EvaluatorMessageDispatcher messageDispatcher, ExceptionCodec exceptionCodec, ContextRepresenters contextRepresenters)
public void close()
close
in interface AutoCloseable
close
in interface ActiveContext
public void sendMessage(byte[] message)
ActiveContext
ContextMessageHandler
, for this context.sendMessage
in interface ActiveContext
message
- The message to be sent.public void submitTask(Configuration taskConf)
TaskSubmittable
submitTask
in interface ActiveContext
submitTask
in interface TaskSubmittable
taskConf
- the Configuration. See TaskConfiguration for detailspublic void submitTask(String taskConf)
public void submitContext(Configuration contextConfiguration)
ContextSubmittable
submitContext
in interface ActiveContext
submitContext
in interface ContextSubmittable
contextConfiguration
- the Configuration of the EvaluatorContext. See ContextConfiguration for details.public void submitContext(String contextConf)
public void submitContextAndService(Configuration contextConfiguration, Configuration serviceConfiguration)
ContextSubmittable
submitContextAndService
in interface ActiveContext
submitContextAndService
in interface ContextSubmittable
contextConfiguration
- the Configuration of the EvaluatorContext. See ContextConfiguration for details.serviceConfiguration
- the Configuration for the Services. See ServiceConfiguration for details.public void submitContextAndService(String contextConf, String serviceConf)
public void submitContextAndService(String contextConf, Optional<String> serviceConf)
public String getEvaluatorId()
getEvaluatorId
in interface ContextBase
public Optional<String> getParentId()
getParentId
in interface ContextBase
public EvaluatorDescriptor getEvaluatorDescriptor()
getEvaluatorDescriptor
in interface ContextBase
public String getId()
Identifiable
getId
in interface ContextBase
getId
in interface Identifiable
public ClosedContext getClosedContext(ActiveContext parentContext)
public FailedContext getFailedContextForEvaluatorFailure()
public FailedContext getFailedContext(ContextStatusPOJO contextStatus)
public boolean isRootContext()
Copyright © 2017 The Apache Software Foundation. All rights reserved.