public abstract class AbstractBindingHandler<E> extends Object implements SocketBinder<E>
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractBindingHandler.Builder<E extends AbstractBindingHandler.Builder>
Builder
|
| Modifier and Type | Field and Description |
|---|---|
protected Processor |
processor |
protected ProcessorSelector |
processorSelector |
protected static Random |
RANDOM |
protected NIOTransport |
transport |
| Constructor and Description |
|---|
AbstractBindingHandler(NIOTransport transport) |
| Modifier and Type | Method and Description |
|---|---|
E |
bind(int port)
Binds Transport to the specific port on localhost.
|
E |
bind(String host,
int port)
Binds Transport to the specific host and port.
|
E |
bind(String host,
int port,
int backlog)
Binds Transport to the specific host and port.
|
E |
bind(String host,
PortRange portRange,
int backlog)
Binds Transport to the specific host, and port within a
PortRange. |
Processor |
getProcessor()
|
ProcessorSelector |
getProcessorSelector()
Gets the default
ProcessorSelector, which will be used to get
Processor to process I/O events, occurring on connection phase. |
protected <T> T |
getSystemInheritedChannel(Class<?> channelType) |
void |
setProcessor(Processor processor)
|
void |
setProcessorSelector(ProcessorSelector processorSelector)
Sets the default
ProcessorSelector, which will be used to get
Processor to process I/O events, occurring on connection phase. |
void |
unbindAll()
This operation is not supported by implementations of
AbstractBindingHandler. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbind, bind, bindToInherited, unbindprotected static final Random RANDOM
protected final NIOTransport transport
protected Processor processor
protected ProcessorSelector processorSelector
public AbstractBindingHandler(NIOTransport transport)
public Processor getProcessor()
public void setProcessor(Processor processor)
public ProcessorSelector getProcessorSelector()
ProcessorSelector, which will be used to get
Processor to process I/O events, occurring on connection phase.ProcessorSelector, which will be used to get
Processor to process I/O events, occurring on connection phase.public void setProcessorSelector(ProcessorSelector processorSelector)
ProcessorSelector, which will be used to get
Processor to process I/O events, occurring on connection phase.processorSelector - the default ProcessorSelector,
which will be used to get Processor to process I/O events,
occurring on connection phase.public E bind(int port) throws IOException
bind in interface SocketBinder<E>ConnectionIOExceptionpublic E bind(String host, int port) throws IOException
bind in interface SocketBinder<E>host - the local host the server will bind toConnectionIOExceptionpublic E bind(String host, int port, int backlog) throws IOException
bind in interface SocketBinder<E>host - the local host the server will bind tobacklog - the maximum length of the queueConnectionIOExceptionpublic E bind(String host, PortRange portRange, int backlog) throws IOException
PortRange.bind in interface SocketBinder<E>host - the local host the server will bind toportRange - PortRange.backlog - the maximum length of the queueConnectionIOExceptionpublic final void unbindAll()
throws IOException
AbstractBindingHandler.unbindAll in interface SocketBinder<E>UnsupportedOperationExceptionIOExceptionprotected <T> T getSystemInheritedChannel(Class<?> channelType) throws IOException
IOExceptionCopyright © 2013 Oracle Corporation. All Rights Reserved.