Package jsl.modeling.resource
Class RequestReactorAdapter
- java.lang.Object
-
- jsl.modeling.resource.RequestReactorAdapter
-
- All Implemented Interfaces:
RequestReactorIfc
public class RequestReactorAdapter extends java.lang.Object implements RequestReactorIfc
A convenience class that implements the RequestReactorIfc. Clients can sub-class this base class and override only those methods that they are interested in. It would be very common to just override the completed() method
-
-
Constructor Summary
Constructors Constructor Description RequestReactorAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidallocated(Request request)Called when the request is placed in the using statevoidcanceled(Request request)Called when the request is placed in the canceled statevoidcompleted(Request request)Called when the request is placed in the completed statevoiddequeued(Request request, Queue<Request> queue)Called when the request is dequeued from the waiting statevoidenqueued(Request request, Queue<Request> queue)Called when the request is placed in the waiting statevoidpreempted(Request request)Called when the request is placed in the preempted statevoidprepared(Request request)Called when the request is placed in the prepared state.voidresumed(Request request)Called when the request is resumed from the preempted state-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jsl.modeling.resource.RequestReactorIfc
rejected
-
-
-
-
Method Detail
-
enqueued
public void enqueued(Request request, Queue<Request> queue)
Description copied from interface:RequestReactorIfcCalled when the request is placed in the waiting state- Specified by:
enqueuedin interfaceRequestReactorIfc- Parameters:
request- the requestqueue- the queue that was entered
-
dequeued
public void dequeued(Request request, Queue<Request> queue)
Description copied from interface:RequestReactorIfcCalled when the request is dequeued from the waiting state- Specified by:
dequeuedin interfaceRequestReactorIfc- Parameters:
request- the requestqueue- the queue that was exited
-
canceled
public void canceled(Request request)
Description copied from interface:RequestReactorIfcCalled when the request is placed in the canceled state- Specified by:
canceledin interfaceRequestReactorIfc- Parameters:
request- the request
-
preempted
public void preempted(Request request)
Description copied from interface:RequestReactorIfcCalled when the request is placed in the preempted state- Specified by:
preemptedin interfaceRequestReactorIfc- Parameters:
request- the request
-
allocated
public void allocated(Request request)
Description copied from interface:RequestReactorIfcCalled when the request is placed in the using state- Specified by:
allocatedin interfaceRequestReactorIfc- Parameters:
request- the request
-
completed
public void completed(Request request)
Description copied from interface:RequestReactorIfcCalled when the request is placed in the completed state- Specified by:
completedin interfaceRequestReactorIfc- Parameters:
request- the request
-
prepared
public void prepared(Request request)
Description copied from interface:RequestReactorIfcCalled when the request is placed in the prepared state. The request is now prepared to use the resource.- Specified by:
preparedin interfaceRequestReactorIfc- Parameters:
request- the request
-
resumed
public void resumed(Request request)
Description copied from interface:RequestReactorIfcCalled when the request is resumed from the preempted state- Specified by:
resumedin interfaceRequestReactorIfc- Parameters:
request- the request
-
-