Package com.tangosol.net
Interface SocketProvider
public interface SocketProvider
SocketProvider defines an abstraction for creating various types of sockets.
- Since:
- Coherence 3.6
- Author:
- mf, jh 2010.04.21
-
Method Summary
Modifier and TypeMethodDescriptionReturn the factory associated with this provider.Return a new DatagramChannel.Return a new DatagramSocket.Return a new MulticastSocket.Return a new ServerSocket.Return a new ServerSocketChannel.Return a new Socket.Return a new SocketChannel.void
setFactory
(SocketProviderFactory factory) Specify the SocketProviderFactory associated with this provider.
-
Method Details
-
openSocket
Return a new Socket.- Returns:
- the Socket
- Throws:
IOException
- if an I/O related error occurs
-
openSocketChannel
Return a new SocketChannel.- Returns:
- the connected SocketChannel
- Throws:
IOException
- if an I/O related error occurs
-
openServerSocket
Return a new ServerSocket.- Returns:
- the ServerSocket
- Throws:
IOException
- if an I/O related error occurs
-
openServerSocketChannel
Return a new ServerSocketChannel.- Returns:
- the ServerSocketChannel
- Throws:
IOException
- if an I/O related error occurs
-
openDatagramSocket
Return a new DatagramSocket.- Returns:
- the DatagramSocket
- Throws:
IOException
- if an I/O related error occurs
-
openDatagramChannel
Return a new DatagramChannel.- Returns:
- the DatagramChannel
- Throws:
IOException
- if an I/O related error occurs
-
openMulticastSocket
Return a new MulticastSocket.- Returns:
- the MulticastSocket
- Throws:
IOException
- if an I/O related error occurs
-
setFactory
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
-