Package org.jboss.as.ejb3.timerservice
Class TimedObjectInvokerImpl
- java.lang.Object
-
- org.jboss.as.ejb3.timerservice.TimedObjectInvokerImpl
-
- All Implemented Interfaces:
TimedObjectInvoker,org.jboss.msc.Service,org.jboss.msc.service.Service<TimedObjectInvoker>,org.jboss.msc.value.Value<TimedObjectInvoker>
public class TimedObjectInvokerImpl extends Object implements TimedObjectInvoker, org.jboss.msc.service.Service<TimedObjectInvoker>
Timed object invoker for an enterprise bean. This is analogous to a view service for timer invocations- Author:
- Stuart Douglas
-
-
Field Summary
Fields Modifier and Type Field Description static org.jboss.msc.service.ServiceNameSERVICE_NAME
-
Constructor Summary
Constructors Constructor Description TimedObjectInvokerImpl(String deploymentString, org.jboss.modules.Module module)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcallTimeout(TimerImpl timer)Invokes the ejbTimeout method on the TimedObject with the given id.voidcallTimeout(TimerImpl timer, Method timeoutMethod)Responsible for invoking the timeout method on the target object.ClassLoadergetClassLoader()org.jboss.msc.value.InjectedValue<EJBComponent>getEjbComponent()StringgetTimedObjectId()The globally unique identifier for this timed object invoker.TimedObjectInvokergetValue()voidstart(org.jboss.msc.service.StartContext context)voidstop(org.jboss.msc.service.StopContext context)
-
-
-
Constructor Detail
-
TimedObjectInvokerImpl
public TimedObjectInvokerImpl(String deploymentString, org.jboss.modules.Module module)
-
-
Method Detail
-
callTimeout
public void callTimeout(TimerImpl timer, Method timeoutMethod) throws Exception
Description copied from interface:TimedObjectInvokerResponsible for invoking the timeout method on the target object.The timerservice implementation invokes this method as a callback when a timeout occurs for the passed
timer. The timerservice implementation will be responsible for passing the correct timeout method corresponding to thetimeron which the timeout has occurred.- Specified by:
callTimeoutin interfaceTimedObjectInvoker- Parameters:
timer- the Timer that is passed to ejbTimeouttimeoutMethod- The timeout method- Throws:
Exception
-
getTimedObjectId
public String getTimedObjectId()
Description copied from interface:TimedObjectInvokerThe globally unique identifier for this timed object invoker.- Specified by:
getTimedObjectIdin interfaceTimedObjectInvoker- Returns:
- the identifier
-
callTimeout
public void callTimeout(TimerImpl timer) throws Exception
Description copied from interface:TimedObjectInvokerInvokes the ejbTimeout method on the TimedObject with the given id.- Specified by:
callTimeoutin interfaceTimedObjectInvoker- Parameters:
timer- the Timer that is passed to ejbTimeout- Throws:
Exception
-
getClassLoader
public ClassLoader getClassLoader()
- Specified by:
getClassLoaderin interfaceTimedObjectInvoker- Returns:
- The class loader that should be used to load restore any timers for this object
-
start
public void start(org.jboss.msc.service.StartContext context) throws org.jboss.msc.service.StartException- Specified by:
startin interfaceorg.jboss.msc.Service- Specified by:
startin interfaceorg.jboss.msc.service.Service<TimedObjectInvoker>- Throws:
org.jboss.msc.service.StartException
-
stop
public void stop(org.jboss.msc.service.StopContext context)
- Specified by:
stopin interfaceorg.jboss.msc.Service- Specified by:
stopin interfaceorg.jboss.msc.service.Service<TimedObjectInvoker>
-
getValue
public TimedObjectInvoker getValue() throws IllegalStateException, IllegalArgumentException
- Specified by:
getValuein interfaceorg.jboss.msc.value.Value<TimedObjectInvoker>- Throws:
IllegalStateExceptionIllegalArgumentException
-
getEjbComponent
public org.jboss.msc.value.InjectedValue<EJBComponent> getEjbComponent()
-
-