public abstract class AbstractBindingHandler extends Object implements SocketBinder
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 |
---|---|
Connection |
bind(int port)
Binds Transport to the specific port on localhost.
|
Connection |
bind(String host,
int port)
Binds Transport to the specific host and port.
|
Connection |
bind(String host,
int port,
int backlog)
Binds Transport to the specific host and port.
|
Connection |
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, wait
bind, bind, bindToInherited, unbind
protected 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 Connection bind(int port) throws IOException
bind
in interface SocketBinder
Connection
IOException
public Connection bind(String host, int port) throws IOException
bind
in interface SocketBinder
host
- the local host the server will bind toConnection
IOException
public Connection bind(String host, int port, int backlog) throws IOException
bind
in interface SocketBinder
host
- the local host the server will bind tobacklog
- the maximum length of the queueConnection
IOException
public Connection bind(String host, PortRange portRange, int backlog) throws IOException
PortRange
.bind
in interface SocketBinder
host
- the local host the server will bind toportRange
- PortRange
.backlog
- the maximum length of the queueConnection
IOException
public final void unbindAll()
AbstractBindingHandler
.unbindAll
in interface SocketBinder
UnsupportedOperationException
protected <T> T getSystemInheritedChannel(Class<?> channelType) throws IOException
IOException
Copyright © 2014 Oracle Corporation. All rights reserved.