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
All Methods Instance Methods Abstract Methods 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.
-
-
-
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
-
-