java.lang.Object
org.glassfish.grizzly.AbstractBindingHandler
- All Implemented Interfaces:
SocketBinder
- Direct Known Subclasses:
TCPNIOBindingHandler,UDPNIOBindingHandler
- Since:
- 2.2.19
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Processorprotected ProcessorSelectorprotected static final Randomprotected final NIOTransport -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionConnection<?>bind(int port) Binds Transport to the specific port on localhost.Connection<?>Binds Transport to the specific host and port.Connection<?>Binds Transport to the specific host and port.Connection<?>Binds Transport to the specific host, and port within aPortRange.Connection<?>Binds Transport to the specific host, and port within aPortRange.Gets the defaultProcessorSelector, which will be used to getProcessorto process I/O events, occurring on connection phase.protected <T> TgetSystemInheritedChannel(Class<?> channelType) voidsetProcessor(Processor processor) voidsetProcessorSelector(ProcessorSelector processorSelector) Sets the defaultProcessorSelector, which will be used to getProcessorto process I/O events, occurring on connection phase.final voidThis operation is not supported by implementations ofAbstractBindingHandler.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.glassfish.grizzly.SocketBinder
bind, bind, bindToInherited, unbind
-
Field Details
-
RANDOM
-
transport
-
processor
-
processorSelector
-
-
Constructor Details
-
AbstractBindingHandler
-
-
Method Details
-
getProcessor
-
setProcessor
-
getProcessorSelector
Gets the defaultProcessorSelector, which will be used to getProcessorto process I/O events, occurring on connection phase.- Returns:
- the default
ProcessorSelector, which will be used to getProcessorto process I/O events, occurring on connection phase.
-
setProcessorSelector
Sets the defaultProcessorSelector, which will be used to getProcessorto process I/O events, occurring on connection phase.- Parameters:
processorSelector- the defaultProcessorSelector, which will be used to getProcessorto process I/O events, occurring on connection phase.
-
bind
Binds Transport to the specific port on localhost.- Specified by:
bindin interfaceSocketBinder- Parameters:
port- the port to bind to- Returns:
- bound
Connection - Throws:
IOException- if unable to bind i.e. if port already bound
-
bind
Binds Transport to the specific host and port.- Specified by:
bindin interfaceSocketBinder- Parameters:
host- the local host the server will bind toport- specific port to bind to- Returns:
- bound
Connection - Throws:
IOException- if unable to bind i.e. if port already bound
-
bind
Binds Transport to the specific host and port.- Specified by:
bindin interfaceSocketBinder- Parameters:
host- the local host the server will bind toport- the port to bind tobacklog- the maximum length of the queue- Returns:
- bound
Connection - Throws:
IOException- if unable to bind i.e. if port already bound
-
bind
Binds Transport to the specific host, and port within aPortRange.- Specified by:
bindin interfaceSocketBinder- Parameters:
host- the local host the server will bind toportRange-PortRange.backlog- the maximum length of the queue- Returns:
- bound
Connection - Throws:
IOException- if unable to bind i.e. if port already bound
-
bind
public Connection<?> bind(String host, PortRange portRange, boolean randomStartPort, int backlog) throws IOException Description copied from interface:SocketBinderBinds Transport to the specific host, and port within aPortRange.- Specified by:
bindin interfaceSocketBinder- Parameters:
host- the local host the server will bind toportRange-PortRange.randomStartPort- if true, a random port in the range will be used as the initial port.backlog- the maximum length of the queue- Returns:
- bound
Connection - Throws:
IOException- if unable to bind i.e. if port already bound
-
unbindAll
public final void unbindAll()This operation is not supported by implementations ofAbstractBindingHandler.- Specified by:
unbindAllin interfaceSocketBinder- Throws:
UnsupportedOperationException- by default
-
getSystemInheritedChannel
- Throws:
IOException
-