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 void
allocated(Request request)
Called when the request is placed in the using statevoid
canceled(Request request)
Called when the request is placed in the canceled statevoid
completed(Request request)
Called when the request is placed in the completed statevoid
dequeued(Request request, Queue<Request> queue)
Called when the request is dequeued from the waiting statevoid
enqueued(Request request, Queue<Request> queue)
Called when the request is placed in the waiting statevoid
preempted(Request request)
Called when the request is placed in the preempted statevoid
prepared(Request request)
Called when the request is placed in the prepared state.void
resumed(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:RequestReactorIfc
Called when the request is placed in the waiting state- Specified by:
enqueued
in interfaceRequestReactorIfc
- Parameters:
request
- the requestqueue
- the queue that was entered
-
dequeued
public void dequeued(Request request, Queue<Request> queue)
Description copied from interface:RequestReactorIfc
Called when the request is dequeued from the waiting state- Specified by:
dequeued
in interfaceRequestReactorIfc
- Parameters:
request
- the requestqueue
- the queue that was exited
-
canceled
public void canceled(Request request)
Description copied from interface:RequestReactorIfc
Called when the request is placed in the canceled state- Specified by:
canceled
in interfaceRequestReactorIfc
- Parameters:
request
- the request
-
preempted
public void preempted(Request request)
Description copied from interface:RequestReactorIfc
Called when the request is placed in the preempted state- Specified by:
preempted
in interfaceRequestReactorIfc
- Parameters:
request
- the request
-
allocated
public void allocated(Request request)
Description copied from interface:RequestReactorIfc
Called when the request is placed in the using state- Specified by:
allocated
in interfaceRequestReactorIfc
- Parameters:
request
- the request
-
completed
public void completed(Request request)
Description copied from interface:RequestReactorIfc
Called when the request is placed in the completed state- Specified by:
completed
in interfaceRequestReactorIfc
- Parameters:
request
- the request
-
prepared
public void prepared(Request request)
Description copied from interface:RequestReactorIfc
Called when the request is placed in the prepared state. The request is now prepared to use the resource.- Specified by:
prepared
in interfaceRequestReactorIfc
- Parameters:
request
- the request
-
resumed
public void resumed(Request request)
Description copied from interface:RequestReactorIfc
Called when the request is resumed from the preempted state- Specified by:
resumed
in interfaceRequestReactorIfc
- Parameters:
request
- the request
-
-