public class OpenGridSignalHandlerFactory extends Object implements ActionFactory<SignalHandler>
ExtensionSignalTransporter
as the signal transporter implementation
and the URI from getSignalUri(JobIdentifier)
as the
signal transporter parameter.
Signal URI:s have the form:
ogx://cluster-id/?ABORT,STATUS#job-id
where cluster-id is the username, ip-address and port of the cluster.Modifier and Type | Class and Description |
---|---|
(package private) static class |
OpenGridSignalHandlerFactory.OpenGridSignalHandler
Signal handler implementation.
|
Modifier and Type | Field and Description |
---|---|
private static org.slf4j.Logger |
logger |
static Collection<Signal> |
SUPPORTED_SIGNALS
All supported signals by this signal handler.
|
Constructor and Description |
---|
OpenGridSignalHandlerFactory() |
Modifier and Type | Method and Description |
---|---|
SignalHandler[] |
getActions(InvokationContext<? super SignalHandler> context) |
static String |
getSignalUri(JobIdentifier jobId)
Generate a signal URI that is used to send signals to a given
job on a cluster.
|
boolean |
prepareContext(InvokationContext<? super SignalHandler> context)
If the signal schema is "ogx" this factory should handle it.
|
public static final Collection<Signal> SUPPORTED_SIGNALS
private static final org.slf4j.Logger logger
public static String getSignalUri(JobIdentifier jobId)
jobId
- The job identifierpublic boolean prepareContext(InvokationContext<? super SignalHandler> context)
prepareContext
in interface ActionFactory<SignalHandler>
public SignalHandler[] getActions(InvokationContext<? super SignalHandler> context)
getActions
in interface ActionFactory<SignalHandler>