Package org.jgroups.util
Class DefaultSocketFactory
java.lang.Object
org.jgroups.util.DefaultSocketFactory
- All Implemented Interfaces:
SocketFactory
Default implementation, ignores service names
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Consumer<ServerSocket> private final ServerSocketFactoryprivate final SocketFactory -
Constructor Summary
ConstructorsConstructorDescriptionDefaultSocketFactory(SocketFactory socketFactory, ServerSocketFactory serverSocketFactory) DefaultSocketFactory(SSLContext sslContext) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose(DatagramSocket datagramSocket) voidclose(ServerSocket serverSocket) voidprivate ServerSocketconfigureSocket(ServerSocket socket) private SocketconfigureSocket(Socket socket) createDatagramSocket(String service_name) createDatagramSocket(String service_name, int port) createDatagramSocket(String service_name, int port, InetAddress laddr) createDatagramSocket(String service_name, SocketAddress bindaddr) createMulticastSocket(String service_name) createMulticastSocket(String service_name, int port) createMulticastSocket(String service_name, SocketAddress bindaddr) createServerSocket(String s, int port) createServerSocket(String s, int port, int backlog) createServerSocket(String s, int port, int backlog, InetAddress bindAddress) createSocket(String s, String host, int port) createSocket(String s, String host, int port, InetAddress localHost, int localPort) createSocket(String s, InetAddress host, int port) createSocket(String s, InetAddress host, int port, InetAddress localHost, int localPort) voidsetServerSocketConfigurator(Consumer<ServerSocket> serverSocketConfigurator) voidsetSocketConfigurator(Consumer<Socket> socketConfigurator) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jgroups.util.SocketFactory
close, close, createServerSocketChannel, createServerSocketChannel, createServerSocketChannel, createServerSocketChannel, createSocketChannel, createSocketChannel
-
Field Details
-
socketFactory
-
serverSocketFactory
-
socketConfigurator
-
serverSocketConfigurator
-
-
Constructor Details
-
DefaultSocketFactory
public DefaultSocketFactory() -
DefaultSocketFactory
-
DefaultSocketFactory
-
-
Method Details
-
setSocketConfigurator
-
setServerSocketConfigurator
-
configureSocket
-
configureSocket
-
createSocket
- Specified by:
createSocketin interfaceSocketFactory- Throws:
IOException
-
createSocket
- Specified by:
createSocketin interfaceSocketFactory- Throws:
IOException
-
createSocket
- Specified by:
createSocketin interfaceSocketFactory- Throws:
IOException
-
createSocket
public Socket createSocket(String s, String host, int port, InetAddress localHost, int localPort) throws IOException - Specified by:
createSocketin interfaceSocketFactory- Throws:
IOException
-
createSocket
public Socket createSocket(String s, InetAddress host, int port, InetAddress localHost, int localPort) throws IOException - Specified by:
createSocketin interfaceSocketFactory- Throws:
IOException
-
createServerSocket
- Specified by:
createServerSocketin interfaceSocketFactory- Throws:
IOException
-
createServerSocket
- Specified by:
createServerSocketin interfaceSocketFactory- Throws:
IOException
-
createServerSocket
- Specified by:
createServerSocketin interfaceSocketFactory- Throws:
IOException
-
createServerSocket
public ServerSocket createServerSocket(String s, int port, int backlog, InetAddress bindAddress) throws IOException - Specified by:
createServerSocketin interfaceSocketFactory- Throws:
IOException
-
createDatagramSocket
- Specified by:
createDatagramSocketin interfaceSocketFactory- Throws:
SocketException
-
createDatagramSocket
public DatagramSocket createDatagramSocket(String service_name, SocketAddress bindaddr) throws SocketException - Specified by:
createDatagramSocketin interfaceSocketFactory- Throws:
SocketException
-
createDatagramSocket
- Specified by:
createDatagramSocketin interfaceSocketFactory- Throws:
SocketException
-
createDatagramSocket
public DatagramSocket createDatagramSocket(String service_name, int port, InetAddress laddr) throws SocketException - Specified by:
createDatagramSocketin interfaceSocketFactory- Throws:
SocketException
-
createMulticastSocket
- Specified by:
createMulticastSocketin interfaceSocketFactory- Throws:
IOException
-
createMulticastSocket
- Specified by:
createMulticastSocketin interfaceSocketFactory- Throws:
IOException
-
createMulticastSocket
public MulticastSocket createMulticastSocket(String service_name, SocketAddress bindaddr) throws IOException - Specified by:
createMulticastSocketin interfaceSocketFactory- Throws:
IOException
-
close
- Specified by:
closein interfaceSocketFactory- Throws:
IOException
-
close
- Specified by:
closein interfaceSocketFactory- Throws:
IOException
-
close
- Specified by:
closein interfaceSocketFactory
-