public interface StubSupport
StubFactory| Modifier and Type | Method and Description |
|---|---|
void |
batched(InvocationChannel channel)
Called after batched request is sent over channel and current thread
should hold channel.
|
void |
batchedAndCancelTimeout(InvocationChannel channel)
Called after batched request is sent over channel and current thread
should hold channel.
|
<T extends Throwable,R extends Remote> |
createBatchedRemote(Class<T> remoteFailureException,
InvocationChannel channel,
Class<R> type)
Used by batched methods which return a Remote object.
|
<V> Completion<V> |
createCompletion(Object stub)
Used by asynchronous methods which return a Future or Completion.
|
StubSupport |
dispose()
Returns a StubSupport instance which throws NoSuchObjectException for
all of the above methods.
|
<T extends Throwable> |
failed(Class<T> remoteFailureException,
InvocationChannel channel,
Throwable cause)
Called if invocation failed due to a problem with the channel, and it
should be closed.
|
<T extends Throwable> |
failedAndCancelTimeout(Class<T> remoteFailureException,
InvocationChannel channel,
Throwable cause,
double timeout,
TimeUnit unit)
Called if invocation failed due to a problem with the channel, and it
should be closed.
|
<T extends Throwable> |
failedAndCancelTimeout(Class<T> remoteFailureException,
InvocationChannel channel,
Throwable cause,
long timeout,
TimeUnit unit)
Called if invocation failed due to a problem with the channel, and it
should be closed.
|
void |
finished(InvocationChannel channel,
boolean reset)
Called after channel usage is finished and can be reused for sending
new requests.
|
void |
finishedAndCancelTimeout(InvocationChannel channel,
boolean reset)
Called after channel usage is finished and can be reused for sending
new requests.
|
<T extends Throwable> |
invoke(Class<T> remoteFailureException)
Writes request header to a free channel.
|
<T extends Throwable> |
invoke(Class<T> remoteFailureException,
double timeout,
TimeUnit unit)
Writes request header to free channel.
|
<T extends Throwable> |
invoke(Class<T> remoteFailureException,
long timeout,
TimeUnit unit)
Writes request header to a free channel.
|
void |
rebatch(InvocationChannel channel)
Called by unbatched methods to re-instate a thread-local channel.
|
void |
release(InvocationChannel channel)
Called if channel is to be used for returning a Pipe.
|
Pipe |
requestReply(InvocationChannel channel)
Called if channel is to be used for returning a request-reply Pipe.
|
Link |
sessionLink()
Returns a link to the session that stub is bound to.
|
boolean |
stubEquals(StubSupport support)
Returns a partial equals implementation for the Stub.
|
int |
stubHashCode()
Returns a hashCode implementation for the Stub.
|
String |
stubToString()
Returns a partial toString implementation for the Stub.
|
InvocationChannel |
unbatch()
Called by unbatched methods to temporarily release a thread-local channel.
|
Link sessionLink()
InvocationChannel unbatch()
void rebatch(InvocationChannel channel)
channel - channel returned by unbatch; can be nullIllegalStateException - if a thread-local channel already exists<T extends Throwable> InvocationChannel invoke(Class<T> remoteFailureException) throws T extends Throwable
T extends Throwable<T extends Throwable> InvocationChannel invoke(Class<T> remoteFailureException, long timeout, TimeUnit unit) throws T extends Throwable
T extends Throwable<T extends Throwable> InvocationChannel invoke(Class<T> remoteFailureException, double timeout, TimeUnit unit) throws T extends Throwable
T extends Throwable<V> Completion<V> createCompletion(Object stub)
stub - pass stub instance to prevent remote object from being
identified as unreferenced<T extends Throwable,R extends Remote> R createBatchedRemote(Class<T> remoteFailureException, InvocationChannel channel, Class<R> type) throws T extends Throwable
type - type of remote object returned by batched methodT extends Throwablevoid batched(InvocationChannel channel)
void batchedAndCancelTimeout(InvocationChannel channel)
void release(InvocationChannel channel)
Pipe requestReply(InvocationChannel channel)
void finished(InvocationChannel channel, boolean reset)
reset - pass true if object output should be resetvoid finishedAndCancelTimeout(InvocationChannel channel, boolean reset)
reset - pass true if object output should be reset<T extends Throwable> T failed(Class<T> remoteFailureException, InvocationChannel channel, Throwable cause)
<T extends Throwable> T failedAndCancelTimeout(Class<T> remoteFailureException, InvocationChannel channel, Throwable cause, long timeout, TimeUnit unit)
<T extends Throwable> T failedAndCancelTimeout(Class<T> remoteFailureException, InvocationChannel channel, Throwable cause, double timeout, TimeUnit unit)
StubSupport dispose()
int stubHashCode()
boolean stubEquals(StubSupport support)
String stubToString()
Copyright © 2006–2015 Cojen. All rights reserved.