Top Description Inners Methods
org.xnio.conduits

public Interface TerminateHandler

Known Direct Subinterfaces
org.xnio.conduits.WriteReadyHandler, org.xnio.conduits.ReadReadyHandler
Known Direct Implementers
org.xnio.conduits.TerminateHandler.ChannelListenerHandler
Imports
java.nio.channels.Channel, org.xnio.ChannelListeners, .IoUtils, org.xnio.channels.CloseListenerSettable

The base ready handler type, which can forward termination requests as well as notifications of termination completion.
Author
David M. Lloyd

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
TerminateHandler.ChannelListenerHandler<
the channel type
C extends Channel & CloseListenerSettable<C>
>

A terminate handler which calls a channel listener on termination notification.

public static class
TerminateHandler.ReadyTask

A runnable task which invokes the TerminateHandler#terminated() method of the given handler.

Method Summary

Modifier and TypeMethod and Description
public void
forceTermination()

Force the front-end channel to close, in response to XNIO worker shutdown.

public void
terminated()

Indicate that a previous shutdown request has successfully resulted in termination.

Method Detail

forceTerminationback to summary
public void forceTermination()

Force the front-end channel to close, in response to XNIO worker shutdown.

terminatedback to summary
public void terminated()

Indicate that a previous shutdown request has successfully resulted in termination.

org.xnio.conduits back to summary

public Class TerminateHandler.ChannelListenerHandler<C extends Channel & CloseListenerSettable<C>>

extends Object
implements TerminateHandler
Class Inheritance
All Implemented Interfaces
org.xnio.conduits.TerminateHandler
Type Parameters
<C>
the channel type

A terminate handler which calls a channel listener on termination notification.

Field Summary

Modifier and TypeField and Description
private final C

Constructor Summary

AccessConstructor and Description
public
ChannelListenerHandler(final C
the channel to wrap
channel
)

Construct a new instance.

Method Summary

Modifier and TypeMethod and Description
public void
forceTermination()

Implements org.xnio.conduits.TerminateHandler.forceTermination.

Force the front-end channel to close, in response to XNIO worker shutdown.

public void
terminated()

Implements org.xnio.conduits.TerminateHandler.terminated.

Indicate that a previous shutdown request has successfully resulted in termination.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

channelback to summary
private final C channel

Constructor Detail

ChannelListenerHandlerback to summary
public ChannelListenerHandler(final C channel)

Construct a new instance.

Parameters
channel:C

the channel to wrap

Method Detail

forceTerminationback to summary
public void forceTermination()

Implements org.xnio.conduits.TerminateHandler.forceTermination.

Doc from org.xnio.conduits.TerminateHandler.forceTermination.

Force the front-end channel to close, in response to XNIO worker shutdown.

terminatedback to summary
public void terminated()

Implements org.xnio.conduits.TerminateHandler.terminated.

Doc from org.xnio.conduits.TerminateHandler.terminated.

Indicate that a previous shutdown request has successfully resulted in termination.

org.xnio.conduits back to summary

public Class TerminateHandler.ReadyTask

extends Object
implements Runnable
Class Inheritance
All Implemented Interfaces
java.lang.Runnable

A runnable task which invokes the TerminateHandler#terminated() method of the given handler.

Field Summary

Modifier and TypeField and Description
private final TerminateHandler

Constructor Summary

AccessConstructor and Description
public
ReadyTask(final TerminateHandler
the handler to run
handler
)

Construct a new instance.

Method Summary

Modifier and TypeMethod and Description
public void
run()

Implements java.lang.Runnable.run.

Runs this operation.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

handlerback to summary
private final TerminateHandler handler

Constructor Detail

ReadyTaskback to summary
public ReadyTask(final TerminateHandler handler)

Construct a new instance.

Parameters
handler:TerminateHandler

the handler to run

Method Detail

runback to summary
public void run()

Implements java.lang.Runnable.run.

Doc from java.lang.Runnable.run.

Runs this operation.