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 AutoCloseableclose in interface ActiveContextpublic void sendMessage(byte[] message)
ActiveContextContextMessageHandler, for this context.sendMessage in interface ActiveContextmessage - The message to be sent.public void submitTask(Configuration taskConf)
TaskSubmittablesubmitTask in interface ActiveContextsubmitTask in interface TaskSubmittabletaskConf - the Configuration. See TaskConfiguration for detailspublic void submitTask(String taskConf)
public void submitContext(Configuration contextConfiguration)
ContextSubmittablesubmitContext in interface ActiveContextsubmitContext in interface ContextSubmittablecontextConfiguration - the Configuration of the EvaluatorContext. See ContextConfiguration for details.public void submitContext(String contextConf)
public void submitContextAndService(Configuration contextConfiguration, Configuration serviceConfiguration)
ContextSubmittablesubmitContextAndService in interface ActiveContextsubmitContextAndService in interface ContextSubmittablecontextConfiguration - 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 ContextBasepublic Optional<String> getParentId()
getParentId in interface ContextBasepublic EvaluatorDescriptor getEvaluatorDescriptor()
getEvaluatorDescriptor in interface ContextBasepublic String getId()
IdentifiablegetId in interface ContextBasegetId in interface Identifiablepublic ClosedContext getClosedContext(ActiveContext parentContext)
public FailedContext getFailedContextForEvaluatorFailure()
public FailedContext getFailedContext(ContextStatusPOJO contextStatus)
public boolean isRootContext()
Copyright © 2017 The Apache Software Foundation. All rights reserved.