Package org.eclipse.net4j.signal
Class RequestWithMonitoring<RESULT>
java.lang.Object
org.eclipse.net4j.signal.Signal
org.eclipse.net4j.signal.SignalActor
org.eclipse.net4j.signal.RequestWithConfirmation<RESULT>
org.eclipse.net4j.signal.RequestWithMonitoring<RESULT>
- All Implemented Interfaces:
Runnable
- Direct Known Subclasses:
AuthenticationRequest
,ConfirmationRequest
Represents the sender side of a two-way
signal
with additional support for remote progress monitoring.- Since:
- 2.0
- Author:
- Eike Stepper
-
Field Summary
Modifier and TypeFieldDescriptionstatic final long
static final int
static final int
Fields inherited from class org.eclipse.net4j.signal.Signal
NO_TIMEOUT
-
Constructor Summary
ConstructorDescriptionRequestWithMonitoring
(SignalProtocol<?> protocol, short signalID) RequestWithMonitoring
(SignalProtocol<?> protocol, short id, String name) RequestWithMonitoring
(SignalProtocol<?> protocol, Enum<?> literal) -
Method Summary
Modifier and TypeMethodDescriptionprotected final RESULT
confirming
(org.eclipse.net4j.util.io.ExtendedDataInputStream in) Important Note: The confirmation must not be empty, i.e.protected abstract RESULT
confirming
(org.eclipse.net4j.util.io.ExtendedDataInputStream in, org.eclipse.net4j.util.om.monitor.OMMonitor monitor) Important Note: The confirmation must not be empty, i.e.protected ExecutorService
protected long
protected int
protected int
protected int
protected int
protected final void
requesting
(org.eclipse.net4j.util.io.ExtendedDataOutputStream out) protected abstract void
requesting
(org.eclipse.net4j.util.io.ExtendedDataOutputStream out, org.eclipse.net4j.util.om.monitor.OMMonitor monitor) send()
send
(long timeout) send
(long timeout, org.eclipse.net4j.util.om.monitor.OMMonitor monitor) send
(org.eclipse.net4j.util.om.monitor.OMMonitor monitor) sendAsync
(org.eclipse.net4j.util.om.monitor.OMMonitor monitor) Methods inherited from class org.eclipse.net4j.signal.RequestWithConfirmation
getAsyncExecutorService, onRemoteException
Methods inherited from class org.eclipse.net4j.signal.SignalActor
execute
Methods inherited from class org.eclipse.net4j.signal.Signal
closeChannelAfterMe, closeInputStreamAfterMe, closeOutputStreamAfterMe, finishInputStream, finishOutputStream, flush, getAdditionalInfo, getBufferInputStream, getBufferOutputStream, getCorrelationID, getCurrentInputStream, getCurrentOutputStream, getID, getName, getProtocol, handleRunException, run, toString, toString, wrapInputStream, wrapOutputStream
-
Field Details
-
DEFAULT_CANCELATION_POLL_INTERVAL
public static final long DEFAULT_CANCELATION_POLL_INTERVAL- Since:
- 2.0
- See Also:
-
DEFAULT_MONITOR_PROGRESS_SECONDS
public static final int DEFAULT_MONITOR_PROGRESS_SECONDS- Since:
- 2.0
- See Also:
-
DEFAULT_MONITOR_TIMEOUT_SECONDS
public static final int DEFAULT_MONITOR_TIMEOUT_SECONDS- Since:
- 2.0
- See Also:
-
-
Constructor Details
-
RequestWithMonitoring
- Since:
- 2.0
-
RequestWithMonitoring
- Since:
- 2.0
-
RequestWithMonitoring
- Since:
- 2.0
-
-
Method Details
-
sendAsync
- Overrides:
sendAsync
in classRequestWithConfirmation<RESULT>
-
sendAsync
-
send
- Overrides:
send
in classRequestWithConfirmation<RESULT>
- Throws:
Exception
RemoteException
-
send
- Overrides:
send
in classRequestWithConfirmation<RESULT>
- Throws:
Exception
RemoteException
-
send
public RESULT send(org.eclipse.net4j.util.om.monitor.OMMonitor monitor) throws Exception, RemoteException - Throws:
Exception
RemoteException
-
send
public RESULT send(long timeout, org.eclipse.net4j.util.om.monitor.OMMonitor monitor) throws Exception, RemoteException - Throws:
Exception
RemoteException
-
requesting
protected final void requesting(org.eclipse.net4j.util.io.ExtendedDataOutputStream out) throws Exception - Specified by:
requesting
in classRequestWithConfirmation<RESULT>
- Throws:
Exception
-
confirming
protected final RESULT confirming(org.eclipse.net4j.util.io.ExtendedDataInputStream in) throws Exception Description copied from class:RequestWithConfirmation
Important Note: The confirmation must not be empty, i.e. the stream must be used at least to read aboolean
. Otherwise synchronization problems will result!- Specified by:
confirming
in classRequestWithConfirmation<RESULT>
- Throws:
Exception
-
requesting
protected abstract void requesting(org.eclipse.net4j.util.io.ExtendedDataOutputStream out, org.eclipse.net4j.util.om.monitor.OMMonitor monitor) throws Exception - Throws:
Exception
-
confirming
protected abstract RESULT confirming(org.eclipse.net4j.util.io.ExtendedDataInputStream in, org.eclipse.net4j.util.om.monitor.OMMonitor monitor) throws Exception Important Note: The confirmation must not be empty, i.e. the stream must be used at least to read aboolean
. Otherwise synchronization problems will result!- Throws:
Exception
-
getCancelationExecutorService
- Since:
- 2.0
-
getCancelationPollInterval
protected long getCancelationPollInterval()- Since:
- 2.0
-
getMonitorProgressSeconds
protected int getMonitorProgressSeconds()- Since:
- 2.0
-
getMonitorTimeoutSeconds
protected int getMonitorTimeoutSeconds()- Since:
- 2.0
-
getRequestingWorkPercent
protected int getRequestingWorkPercent()- Since:
- 2.0
-
getConfirmingWorkPercent
protected int getConfirmingWorkPercent()- Since:
- 2.0
-