Package com.tangosol.net
Class TcpDatagramSocketProvider
- java.lang.Object
-
- com.tangosol.net.TcpDatagramSocketProvider
-
- All Implemented Interfaces:
DatagramSocketProvider
public class TcpDatagramSocketProvider extends Object implements DatagramSocketProvider
TcpDatagramSocketProvider produces datagram sockets that uses TCP sockets underneath for unicast communication. For multicast, it still uses the MulticastSockets.- Since:
- Coherence 12.1.2
- Author:
- bb 2011.11.21
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TcpDatagramSocketProvider.DefaultDependencies
DefaultDependenceis is a basic implementation of the Dependencies interface providing "setter" methods for each property.static interface
TcpDatagramSocketProvider.Dependencies
Dependencies specifies all dependency requirements of the TcpDatagramSocketProvider.
-
Field Summary
Fields Modifier and Type Field Description static TcpDatagramSocketProvider
INSTANCE
A default SocketProvider instance.protected TcpDatagramSocketProvider.Dependencies
m_dependencies
TcpDatagramSocketProvider Dependencies
-
Constructor Summary
Constructors Constructor Description TcpDatagramSocketProvider()
Construct a TcpDatagramSocketProvider.TcpDatagramSocketProvider(TcpDatagramSocketProvider.Dependencies deps)
Construct a TcpDatagramSocketProvider
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected TcpDatagramSocket
configure(TcpDatagramSocket socket)
Configure the socket.boolean
isSecure()
Return true iff the provider returns sockets which are secured, for instance by TLS.DatagramSocket
openDatagramSocket()
Return a new DatagramSocket.MulticastSocket
openMulticastSocket()
Return a new MulticastSocket.String
toString()
-
-
-
Field Detail
-
INSTANCE
public static final TcpDatagramSocketProvider INSTANCE
A default SocketProvider instance.
-
m_dependencies
protected TcpDatagramSocketProvider.Dependencies m_dependencies
TcpDatagramSocketProvider Dependencies
-
-
Constructor Detail
-
TcpDatagramSocketProvider
public TcpDatagramSocketProvider()
Construct a TcpDatagramSocketProvider.
-
TcpDatagramSocketProvider
public TcpDatagramSocketProvider(TcpDatagramSocketProvider.Dependencies deps)
Construct a TcpDatagramSocketProvider- Parameters:
deps
- the provider dependencies, or null
-
-
Method Detail
-
openDatagramSocket
public DatagramSocket openDatagramSocket() throws IOException
Return a new DatagramSocket.- Specified by:
openDatagramSocket
in interfaceDatagramSocketProvider
- Returns:
- the DatagramSocket
- Throws:
IOException
- if an I/O related error occurs
-
openMulticastSocket
public MulticastSocket openMulticastSocket() throws IOException
Return a new MulticastSocket.- Specified by:
openMulticastSocket
in interfaceDatagramSocketProvider
- Returns:
- the MulticastSocket
- Throws:
IOException
- if an I/O related error occurs
-
isSecure
public boolean isSecure()
Return true iff the provider returns sockets which are secured, for instance by TLS.- Specified by:
isSecure
in interfaceDatagramSocketProvider
- Returns:
- true iff the provider returns secured sockets
-
configure
protected TcpDatagramSocket configure(TcpDatagramSocket socket)
Configure the socket.- Parameters:
socket
- the socket- Returns:
- the configured socket
-
-