Top Fields Constructors Methods
org.glassfish.grizzly.utils

public Class CompletionHandlerAdapter<A, B>

extends Object
implements CompletionHandler<B>
Class Inheritance
All Implemented Interfaces
org.glassfish.grizzly.CompletionHandler
Known Direct Subclasses
org.glassfish.grizzly.ssl.SSLStreamWriter.HandshakeCompletionHandler, org.glassfish.grizzly.streams.AbstractStreamReader.DecodeCompletionHandler
Imports
org.glassfish.grizzly.CompletionHandler, org.glassfish.grizzly.impl.FutureImpl

Author
Alexey Stashok

Field Summary

Modifier and TypeField and Description
private final GenericAdapter<B, A>
private final CompletionHandler<A>
private static final GenericAdapter<K, V>
private final FutureImpl<A>

Constructor Summary

AccessConstructor and Description
public
public
CompletionHandlerAdapter(FutureImpl<A> future, CompletionHandler<A> completionHandler)

public
CompletionHandlerAdapter(FutureImpl<A> future, CompletionHandler<A> completionHandler, GenericAdapter<B, A> adapter)

Method Summary

Modifier and TypeMethod and Description
protected A
adapt(B result)

public void
cancelled()

Implements org.glassfish.grizzly.CompletionHandler.cancelled.

The operation was cancelled.

public void
completed(B result)

Implements org.glassfish.grizzly.CompletionHandler.completed.

The operation was completed.

public void
failed(Throwable throwable)

Implements org.glassfish.grizzly.CompletionHandler.failed.

The operation was failed.

private static <K, V> GenericAdapter<K, V>
public void
updated(B result)

Implements org.glassfish.grizzly.CompletionHandler.updated.

The callback method may be called, when there is some progress in operation execution, but it is still not completed

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

adapterback to summary
private final GenericAdapter<B, A> adapter
completionHandlerback to summary
private final CompletionHandler<A> completionHandler
DIRECT_ADAPTERback to summary
private static final GenericAdapter<K, V> DIRECT_ADAPTER
futureback to summary
private final FutureImpl<A> future

Constructor Detail

CompletionHandlerAdapterback to summary
public CompletionHandlerAdapter(FutureImpl<A> future)
CompletionHandlerAdapterback to summary
public CompletionHandlerAdapter(FutureImpl<A> future, CompletionHandler<A> completionHandler)
CompletionHandlerAdapterback to summary
public CompletionHandlerAdapter(FutureImpl<A> future, CompletionHandler<A> completionHandler, GenericAdapter<B, A> adapter)

Method Detail

adaptback to summary
protected A adapt(B result)
cancelledback to summary
public void cancelled()

Implements org.glassfish.grizzly.CompletionHandler.cancelled.

Doc from org.glassfish.grizzly.CompletionHandler.cancelled.

The operation was cancelled.

Annotations
@Override
completedback to summary
public void completed(B result)

Implements org.glassfish.grizzly.CompletionHandler.completed.

Doc from org.glassfish.grizzly.CompletionHandler.completed.

The operation was completed.

Annotations
@Override
failedback to summary
public void failed(Throwable throwable)

Implements org.glassfish.grizzly.CompletionHandler.failed.

Doc from org.glassfish.grizzly.CompletionHandler.failed.

The operation was failed.

Annotations
@Override
getDirectAdapterback to summary
private static <K, V> GenericAdapter<K, V> getDirectAdapter()
Annotations
@SuppressWarnings:unchecked
updatedback to summary
public void updated(B result)

Implements org.glassfish.grizzly.CompletionHandler.updated.

Doc from org.glassfish.grizzly.CompletionHandler.updated.

The callback method may be called, when there is some progress in operation execution, but it is still not completed

Annotations
@Override