Class NetworkRequestTimeoutEvent
java.lang.Object
desmoj.core.simulator.NamedObject
desmoj.core.simulator.ModelComponent
desmoj.core.simulator.Schedulable
desmoj.core.simulator.EventAbstract
desmoj.core.simulator.ExternalEvent
cambio.simulator.entities.NamedExternalEvent
cambio.simulator.entities.networking.NetworkRequestEvent
cambio.simulator.entities.networking.NetworkRequestTimeoutEvent
- All Implemented Interfaces:
IRequestUpdateListener
,Comparable<IRequestUpdateListener>
public class NetworkRequestTimeoutEvent
extends NetworkRequestEvent
implements IRequestUpdateListener
-
Field Summary
Fields inherited from class cambio.simulator.entities.networking.NetworkRequestEvent
travelingRequest, updateListener
Fields inherited from class desmoj.core.simulator.EventAbstract
numberOfEntities
Fields inherited from class desmoj.core.simulator.Schedulable
_schedule
-
Constructor Summary
ConstructorsConstructorDescriptionNetworkRequestTimeoutEvent
(desmoj.core.simulator.Model model, String name, boolean showInTrace, Request request) Constructs and schedules a timeout of a request. -
Method Summary
Modifier and TypeMethodDescriptionint
Gets the priority of this listener.boolean
onRequestFailed
(Request request, desmoj.core.simulator.TimeInstant when, RequestFailedReason reason) Listener for the failure of the sending process.boolean
onRequestResultArrivedAtRequester
(Request request, desmoj.core.simulator.TimeInstant when) Listener for the successful receiving of the answer of a request.void
To be implemented by Subclasses.Methods inherited from class cambio.simulator.entities.networking.NetworkRequestEvent
getTravelingRequest
Methods inherited from class cambio.simulator.entities.NamedExternalEvent
eventRoutine, getPlainName, getQuotedName, getQuotedPlainName, rename
Methods inherited from class desmoj.core.simulator.ExternalEvent
clone, schedule, schedule, schedule, schedule, scheduleAfter, scheduleBefore, schedulePreempt
Methods inherited from class desmoj.core.simulator.EventAbstract
generateTraceForScheduling, getNumberOfEntities, getRealTimeConstraint, getSchedulingPriority, isExternal, setRealTimeConstraint, setSchedulingPriority
Methods inherited from class desmoj.core.simulator.Schedulable
assignReporter, cancel, getCorrespondingReportable, isCurrent, isScheduled, reSchedule, reSchedule, reSchedulePreempt, scheduledNext, setCorrespondingReportable
Methods inherited from class desmoj.core.simulator.ModelComponent
current, currentEntity, currentEntityAll, currentEvent, currentlySendDebugNotes, currentlySendTraceNotes, currentModel, currentSimProcess, debugIsOn, debugOff, debugOn, getModel, isExperimentCompatible, isModelCompatible, presentTime, sendDebugNote, sendMessage, sendTraceNote, sendWarning, skipTraceNote, skipTraceNote, traceIsOn, traceOff, traceOn
Methods inherited from class desmoj.core.simulator.NamedObject
getName, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface cambio.simulator.entities.networking.IRequestUpdateListener
compareTo, onRequestArrivalAtTarget, onRequestSend
-
Constructor Details
-
Method Details
-
onRoutineExecution
public void onRoutineExecution() throws co.paralleluniverse.fibers.SuspendExecutionDescription copied from class:NetworkRequestEvent
To be implemented by Subclasses.- Specified by:
onRoutineExecution
in classNetworkRequestEvent
- Throws:
co.paralleluniverse.fibers.SuspendExecution
-
onRequestFailed
public boolean onRequestFailed(Request request, desmoj.core.simulator.TimeInstant when, RequestFailedReason reason) Description copied from interface:IRequestUpdateListener
Listener for the failure of the sending process. This could for example be due to the receiving service not being available, the request being canceled or timed out. Provides a reference to the failed request.- Specified by:
onRequestFailed
in interfaceIRequestUpdateListener
- Parameters:
request
- request that triggered this eventwhen
- time of this eventreason
- reason why the request failed- Returns:
- true if the request was terminally handled (consumed) by this instance
-
onRequestResultArrivedAtRequester
public boolean onRequestResultArrivedAtRequester(Request request, desmoj.core.simulator.TimeInstant when) Description copied from interface:IRequestUpdateListener
Listener for the successful receiving of the answer of a request.- Specified by:
onRequestResultArrivedAtRequester
in interfaceIRequestUpdateListener
- Parameters:
request
- request that triggered this eventwhen
- time of this event- Returns:
- true if the request was terminally handled (consumed) by this instance
-
getListeningPriority
public int getListeningPriority()Description copied from interface:IRequestUpdateListener
Gets the priority of this listener. Listeners with higher priority will be notified first about the status of a request. The interaction for listeners with equal priority is undefined.- Specified by:
getListeningPriority
in interfaceIRequestUpdateListener
- Returns:
- the Priority of this Listener. Defaults to
Priority#NORMAL
- See Also:
-