public interface SocketProvider
Modifier and Type | Method | Description |
---|---|---|
SocketProviderFactory |
getFactory() |
Return the factory associated with this provider.
|
DatagramChannel |
openDatagramChannel() |
Return a new DatagramChannel.
|
DatagramSocket |
openDatagramSocket() |
Return a new DatagramSocket.
|
MulticastSocket |
openMulticastSocket() |
Return a new MulticastSocket.
|
ServerSocket |
openServerSocket() |
Return a new ServerSocket.
|
ServerSocketChannel |
openServerSocketChannel() |
Return a new ServerSocketChannel.
|
Socket |
openSocket() |
Return a new Socket.
|
SocketChannel |
openSocketChannel() |
Return a new SocketChannel.
|
void |
setFactory(SocketProviderFactory factory) |
Specify the SocketProviderFactory associated with this provider.
|
Socket openSocket() throws IOException
IOException
- if an I/O related error occursSocketChannel openSocketChannel() throws IOException
IOException
- if an I/O related error occursServerSocket openServerSocket() throws IOException
IOException
- if an I/O related error occursServerSocketChannel openServerSocketChannel() throws IOException
IOException
- if an I/O related error occursDatagramSocket openDatagramSocket() throws IOException
IOException
- if an I/O related error occursDatagramChannel openDatagramChannel() throws IOException
IOException
- if an I/O related error occursMulticastSocket openMulticastSocket() throws IOException
IOException
- if an I/O related error occursvoid setFactory(SocketProviderFactory factory)
factory
- the associated factorySocketProviderFactory getFactory()