Class NamedSocketFactory
- java.lang.Object
-
- org.infinispan.remoting.transport.jgroups.NamedSocketFactory
-
- All Implemented Interfaces:
org.jgroups.util.SocketFactory
public class NamedSocketFactory extends Object implements org.jgroups.util.SocketFactory
ASocketFactory
which allows setting a callback to configure the sockets using a supplied name.- Since:
- 13.0
- Author:
- Tristan Tarrant <tristan@infinispan.org>
-
-
Constructor Summary
Constructors Constructor Description NamedSocketFactory(Supplier<SocketFactory> socketFactory, Supplier<ServerSocketFactory> serverSocketFactory)
-
Method Summary
-
-
-
Constructor Detail
-
NamedSocketFactory
public NamedSocketFactory(Supplier<SocketFactory> socketFactory, Supplier<ServerSocketFactory> serverSocketFactory)
-
-
Method Detail
-
getName
public String getName()
-
setName
public void setName(String name)
-
createSocket
public Socket createSocket(String s) throws IOException
- Specified by:
createSocket
in interfaceorg.jgroups.util.SocketFactory
- Throws:
IOException
-
createSocket
public Socket createSocket(String s, String host, int port) throws IOException
- Specified by:
createSocket
in interfaceorg.jgroups.util.SocketFactory
- Throws:
IOException
-
createSocket
public Socket createSocket(String s, InetAddress host, int port) throws IOException
- Specified by:
createSocket
in interfaceorg.jgroups.util.SocketFactory
- Throws:
IOException
-
createSocket
public Socket createSocket(String s, String host, int port, InetAddress localHost, int localPort) throws IOException
- Specified by:
createSocket
in interfaceorg.jgroups.util.SocketFactory
- Throws:
IOException
-
createSocket
public Socket createSocket(String s, InetAddress host, int port, InetAddress localHost, int localPort) throws IOException
- Specified by:
createSocket
in interfaceorg.jgroups.util.SocketFactory
- Throws:
IOException
-
createServerSocket
public ServerSocket createServerSocket(String s) throws IOException
- Specified by:
createServerSocket
in interfaceorg.jgroups.util.SocketFactory
- Throws:
IOException
-
createServerSocket
public ServerSocket createServerSocket(String s, int port) throws IOException
- Specified by:
createServerSocket
in interfaceorg.jgroups.util.SocketFactory
- Throws:
IOException
-
createServerSocket
public ServerSocket createServerSocket(String s, int port, int backlog) throws IOException
- Specified by:
createServerSocket
in interfaceorg.jgroups.util.SocketFactory
- Throws:
IOException
-
createServerSocket
public ServerSocket createServerSocket(String s, int port, int backlog, InetAddress bindAddress) throws IOException
- Specified by:
createServerSocket
in interfaceorg.jgroups.util.SocketFactory
- Throws:
IOException
-
createDatagramSocket
public DatagramSocket createDatagramSocket(String service_name) throws SocketException
- Specified by:
createDatagramSocket
in interfaceorg.jgroups.util.SocketFactory
- Throws:
SocketException
-
createDatagramSocket
public DatagramSocket createDatagramSocket(String service_name, SocketAddress bindaddr) throws SocketException
- Specified by:
createDatagramSocket
in interfaceorg.jgroups.util.SocketFactory
- Throws:
SocketException
-
createDatagramSocket
public DatagramSocket createDatagramSocket(String service_name, int port) throws SocketException
- Specified by:
createDatagramSocket
in interfaceorg.jgroups.util.SocketFactory
- Throws:
SocketException
-
createDatagramSocket
public DatagramSocket createDatagramSocket(String service_name, int port, InetAddress laddr) throws SocketException
- Specified by:
createDatagramSocket
in interfaceorg.jgroups.util.SocketFactory
- Throws:
SocketException
-
createMulticastSocket
public MulticastSocket createMulticastSocket(String service_name) throws IOException
- Specified by:
createMulticastSocket
in interfaceorg.jgroups.util.SocketFactory
- Throws:
IOException
-
createMulticastSocket
public MulticastSocket createMulticastSocket(String service_name, int port) throws IOException
- Specified by:
createMulticastSocket
in interfaceorg.jgroups.util.SocketFactory
- Throws:
IOException
-
createMulticastSocket
public MulticastSocket createMulticastSocket(String service_name, SocketAddress bindaddr) throws IOException
- Specified by:
createMulticastSocket
in interfaceorg.jgroups.util.SocketFactory
- Throws:
IOException
-
close
public void close(Socket socket) throws IOException
- Specified by:
close
in interfaceorg.jgroups.util.SocketFactory
- Throws:
IOException
-
close
public void close(ServerSocket serverSocket) throws IOException
- Specified by:
close
in interfaceorg.jgroups.util.SocketFactory
- Throws:
IOException
-
close
public void close(DatagramSocket datagramSocket)
- Specified by:
close
in interfaceorg.jgroups.util.SocketFactory
-
-