public static interface SocketBindingManager.UnnamedBindingRegistry extends ManagedBindingRegistry
Modifier and Type | Method and Description |
---|---|
void |
registerBinding(ManagedBinding binding)
Register a managed binding.
|
Closeable |
registerChannel(DatagramChannel channel)
Registers an unnamed binding based on the given channel.
|
Closeable |
registerChannel(ServerSocketChannel channel)
Registers an unnamed binding based on the given channel.
|
Closeable |
registerChannel(SocketChannel channel)
Registers an unnamed binding based on the given channel.
|
Closeable |
registerSocket(DatagramSocket socket)
Registers an unnamed binding based on the given socket.
|
Closeable |
registerSocket(ServerSocket socket)
Registers an unnamed binding based on the given socket.
|
Closeable |
registerSocket(Socket socket)
Registers an unnamed binding based on the given socket.
|
void |
unregisterBinding(ManagedBinding binding)
Unregister a managed binding.
|
void |
unregisterChannel(DatagramChannel channel)
Unregisters a binding previously
registered for the channel . |
void |
unregisterChannel(ServerSocketChannel channel)
Unregisters a binding previously
registered for the channel . |
void |
unregisterChannel(SocketChannel channel)
Unregisters a binding previously
registered for the channel . |
void |
unregisterSocket(DatagramSocket socket)
Unregisters a binding previously
registered for the socket . |
void |
unregisterSocket(ServerSocket socket)
Unregisters a binding previously
registered for the socket . |
void |
unregisterSocket(Socket socket)
Unregisters a binding previously
registered for the socket . |
listActiveBindings
Closeable registerSocket(Socket socket)
socket
- the socket. Cannot be null
Closeable
that will unregister the binding and close the socket
if close()
is calledIllegalStateException
- if Socket.getLocalAddress()
returns null
Closeable registerSocket(ServerSocket socket)
socket
- the socket. Cannot be null
Closeable
that will unregister the binding and close the socket
if close()
is calledIllegalStateException
- if Socket.getLocalAddress()
returns null
Closeable registerSocket(DatagramSocket socket)
socket
- the socket. Cannot be null
Closeable
that will unregister the binding and close the socket
if close()
is calledIllegalStateException
- if Socket.getLocalAddress()
returns null
Closeable registerChannel(SocketChannel channel)
channel
- the channel. Cannot be null
Closeable
that will unregister the binding and close the socket
if close()
is calledIllegalStateException
- if calling Socket.getLocalAddress()
on the
channel's socket
returns null
Closeable registerChannel(ServerSocketChannel channel)
channel
- the channel. Cannot be null
Closeable
that will unregister the binding and close the socket
if close()
is calledIllegalStateException
- if calling Socket.getLocalAddress()
on the
channel's socket
returns null
Closeable registerChannel(DatagramChannel channel)
channel
- the channel. Cannot be null
Closeable
that will unregister the binding and close the socket
if close()
is calledIllegalStateException
- if calling Socket.getLocalAddress()
on the
channel's socket
returns null
void unregisterSocket(Socket socket)
registered for the socket
.
For unregistration to work, this method must be called before the socket is closed.
The preferred way to handle this is to call close
on the Closeable
returned by the
registerSocket
and let it handle unregistering the binding and closing the socket.
socket
- the socket. Cannot be null
void unregisterSocket(ServerSocket socket)
registered for the socket
.
For unregistration to work, this method must be called before the socket is closed.
The preferred way to handle this is to call close
on the Closeable
returned by the
registerSocket
and let it handle unregistering the binding and closing the socket.
socket
- the socket. Cannot be null
void unregisterSocket(DatagramSocket socket)
registered for the socket
.
For unregistration to work, this method must be called before the socket is closed.
The preferred way to handle this is to call close
on the Closeable
returned by the
registerSocket
and let it handle unregistering the binding and closing the socket.
socket
- the socket. Cannot be null
void unregisterChannel(SocketChannel channel)
registered for the channel
.
For unregistration to work, this method must be called before the channel's socket is closed.
The preferred way to handle this is to call close
on the Closeable
returned by the
registerSocket
and let it handle unregistering the binding and closing the socket.
channel
- the channel. Cannot be null
void unregisterChannel(ServerSocketChannel channel)
registered for the channel
.
For unregistration to work, this method must be called before the channel's socket is closed.
The preferred way to handle this is to call close
on the Closeable
returned by the
registerSocket
and let it handle unregistering the binding and closing the socket.
channel
- the channel. Cannot be null
void unregisterChannel(DatagramChannel channel)
registered for the channel
.
For unregistration to work, this method must be called before the channel's socket is closed.
The preferred way to handle this is to call close
on the Closeable
returned by the
registerSocket
and let it handle unregistering the binding and closing the socket.
channel
- the channel. Cannot be null
void registerBinding(ManagedBinding binding)
registerBinding
in interface ManagedBindingRegistry
binding
- the managed bindingIllegalStateException
- if ManagedBinding.getBindAddress()
returns null
void unregisterBinding(ManagedBinding binding)
unregisterBinding
in interface ManagedBindingRegistry
binding
- the managed bindingIllegalStateException
- if ManagedBinding.getBindAddress()
returns null
Copyright © 2023 JBoss by Red Hat. All rights reserved.