public class BlockingInvocation extends Invocation
Modifier and Type | Class and Description |
---|---|
class |
BlockingInvocation.Response
An invocation response for a blocking invocation.
|
Constructor and Description |
---|
BlockingInvocation(int index)
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Cancel the invocation, causing all future responses to be closed without being read.
|
BlockingInvocation.Response |
getResponse()
Get the next queued response, waiting if necessary.
|
void |
handleClosed()
Handle closure of the channel.
|
void |
handleException(IOException exception)
Handle a failure that occurred on the channel while the invocation was outstanding.
|
void |
handleResponse(int parameter,
MessageInputStream inputStream)
Handle a response on this invocation.
|
getIndex
public BlockingInvocation(int index)
index
- the invocation indexpublic BlockingInvocation.Response getResponse() throws InterruptedException
InterruptedException
- if the thread was interrupted while waitingpublic void handleResponse(int parameter, MessageInputStream inputStream)
Invocation
inputStream
is closed.handleResponse
in class Invocation
parameter
- the numeric parameter passed in to the trackerinputStream
- the body of the messagepublic void handleClosed()
Invocation
handleClosed
in class Invocation
public void handleException(IOException exception)
Invocation
handleException
in class Invocation
exception
- the exception that was thrownpublic void cancel()
Copyright © 2019 JBoss by Red Hat. All rights reserved.