Package com.adaptris.core.services.jmx
Class JmxWaitService
- java.lang.Object
-
- com.adaptris.core.ServiceImp
-
- com.adaptris.core.services.jmx.JmxOperationImpl
-
- com.adaptris.core.services.jmx.JmxOperationServiceImpl
-
- com.adaptris.core.services.jmx.JmxWaitService
-
- All Implemented Interfaces:
AdaptrisComponent
,ComponentLifecycle
,ComponentLifecycleExtension
,ConnectedService
,MessageEventGenerator
,Service
,StateManagedComponent
@ComponentProfile(summary="Execute a JMX operation", tag="service,jmx", recommended=JmxConnection.class) public class JmxWaitService extends JmxOperationServiceImpl
Allows you to make a remote call on a JMX operation and wait until the result from the JMX operation is "true"
You can set parameters for the call using
ValueTranslator
implements. The result of the JMX operation is always expected to be aBoolean
. When used in conjunction withInFlightWorkflowInterceptor
you can use this service to pause processing until the workflow in question does not have any in flight messages.- Since:
- 3.3.0
In the adapter configuration file this class is aliased as jmx-wait-service which is the preferred alternative to the fully qualified classname when building your configuration.
-
-
Field Summary
-
Fields inherited from class com.adaptris.core.ServiceImp
log
-
-
Constructor Summary
Constructors Constructor Description JmxWaitService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doService(AdaptrisMessage message)
Apply the service to the message.java.lang.Boolean
getNegate()
TimeInterval
getRetryInterval()
void
setNegate(java.lang.Boolean n)
Switches the success criteria to!operation
if set to true.void
setRetryInterval(TimeInterval retryInterval)
-
Methods inherited from class com.adaptris.core.services.jmx.JmxOperationServiceImpl
closeService, getConnection, initService, prepare, setConnection, start, stop
-
Methods inherited from class com.adaptris.core.services.jmx.JmxOperationImpl
getObjectName, getOperationName, getOperationParameters, parametersToArray, parametersToTypeArray, setObjectName, setOperationName, setOperationParameters
-
Methods inherited from class com.adaptris.core.ServiceImp
changeState, close, continueOnFailure, createName, createQualifier, getContinueOnFail, getIsTrackingEndpoint, getUniqueId, init, isBranching, isTrackingEndpoint, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, setContinueOnFail, setIsTrackingEndpoint, setUniqueId
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.adaptris.core.AdaptrisComponent
getUniqueId
-
Methods inherited from interface com.adaptris.core.ComponentLifecycle
close, init
-
Methods inherited from interface com.adaptris.core.MessageEventGenerator
createName, createQualifier, isTrackingEndpoint
-
Methods inherited from interface com.adaptris.core.Service
continueOnFailure, isBranching, setUniqueId
-
Methods inherited from interface com.adaptris.core.StateManagedComponent
changeState, requestClose, requestInit, requestStart, requestStop, retrieveComponentState
-
-
-
-
Method Detail
-
doService
public void doService(AdaptrisMessage message) throws ServiceException
Description copied from interface:Service
Apply the service to the message.
- Parameters:
message
- theAdaptrisMessage
to process- Throws:
ServiceException
- wrapping any underlyingException
s
-
getRetryInterval
public TimeInterval getRetryInterval()
- Returns:
- the retryInterval
-
setRetryInterval
public void setRetryInterval(TimeInterval retryInterval)
- Parameters:
retryInterval
- the retryInterval to set
-
getNegate
public java.lang.Boolean getNegate()
- Returns:
- the negate
-
setNegate
public void setNegate(java.lang.Boolean n)
Switches the success criteria to!operation
if set to true.- Parameters:
n
- the negate to set, defaults to false.
-
-