Package com.tangosol.net
Interface SocketProvider
-
public interface SocketProviderSocketProvider defines an abstraction for creating various types of sockets.- Since:
- Coherence 3.6
- Author:
- mf, jh 2010.04.21
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SocketProviderFactorygetFactory()Return the factory associated with this provider.DatagramChannelopenDatagramChannel()Return a new DatagramChannel.DatagramSocketopenDatagramSocket()Return a new DatagramSocket.MulticastSocketopenMulticastSocket()Return a new MulticastSocket.ServerSocketopenServerSocket()Return a new ServerSocket.ServerSocketChannelopenServerSocketChannel()Return a new ServerSocketChannel.SocketopenSocket()Return a new Socket.SocketChannelopenSocketChannel()Return a new SocketChannel.voidsetFactory(SocketProviderFactory factory)Specify the SocketProviderFactory associated with this provider.
-
-
-
Method Detail
-
openSocket
Socket openSocket() throws IOException
Return a new Socket.- Returns:
- the Socket
- Throws:
IOException- if an I/O related error occurs
-
openSocketChannel
SocketChannel openSocketChannel() throws IOException
Return a new SocketChannel.- Returns:
- the connected SocketChannel
- Throws:
IOException- if an I/O related error occurs
-
openServerSocket
ServerSocket openServerSocket() throws IOException
Return a new ServerSocket.- Returns:
- the ServerSocket
- Throws:
IOException- if an I/O related error occurs
-
openServerSocketChannel
ServerSocketChannel openServerSocketChannel() throws IOException
Return a new ServerSocketChannel.- Returns:
- the ServerSocketChannel
- Throws:
IOException- if an I/O related error occurs
-
openDatagramSocket
DatagramSocket openDatagramSocket() throws IOException
Return a new DatagramSocket.- Returns:
- the DatagramSocket
- Throws:
IOException- if an I/O related error occurs
-
openDatagramChannel
DatagramChannel openDatagramChannel() throws IOException
Return a new DatagramChannel.- Returns:
- the DatagramChannel
- Throws:
IOException- if an I/O related error occurs
-
openMulticastSocket
MulticastSocket openMulticastSocket() throws IOException
Return a new MulticastSocket.- Returns:
- the MulticastSocket
- Throws:
IOException- if an I/O related error occurs
-
setFactory
void setFactory(SocketProviderFactory factory)
Specify the SocketProviderFactory associated with this provider.- Parameters:
factory- the associated factory
-
getFactory
SocketProviderFactory getFactory()
Return the factory associated with this provider.- Returns:
- the associated factory
-
-