Package org.jboss.remoting3.util
Class Invocation
- java.lang.Object
-
- org.jboss.remoting3.util.Invocation
-
- Direct Known Subclasses:
BlockingInvocation
public abstract class Invocation extends Object
A request-response invocation.- Author:
- David M. Lloyd
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Invocation(int index)
Construct a new instance.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description int
getIndex()
Get the invocation index.abstract void
handleClosed()
Handle closure of the channel.abstract void
handleException(IOException exception)
Handle a failure that occurred on the channel while the invocation was outstanding.abstract void
handleResponse(int parameter, MessageInputStream inputStream)
Handle a response on this invocation.
-
-
-
Method Detail
-
getIndex
public int getIndex()
Get the invocation index.- Returns:
- the invocation index
-
handleResponse
public abstract void handleResponse(int parameter, MessageInputStream inputStream)
Handle a response on this invocation. The response may be final or it may be an update. Long tasks should be executed in a worker thread. This method must guarantee thatinputStream
is closed.- Parameters:
parameter
- the numeric parameter passed in to the trackerinputStream
- the body of the message
-
handleClosed
public abstract void handleClosed()
Handle closure of the channel.
-
handleException
public abstract void handleException(IOException exception)
Handle a failure that occurred on the channel while the invocation was outstanding.- Parameters:
exception
- the exception that was thrown
-
-