Class AFTIPCSocketFactory.ServiceAddress
java.lang.Object
javax.net.SocketFactory
org.newsclub.net.unix.AFSocketFactory<AFTIPCSocketAddress>
org.newsclub.net.unix.tipc.AFTIPCSocketFactory
org.newsclub.net.unix.tipc.AFTIPCSocketFactory.ServiceAddress
- All Implemented Interfaces:
AFSocketAddressFromHostname<AFTIPCSocketAddress>
- Enclosing class:
AFTIPCSocketFactory
Always connects sockets to the given TIPC type and instance.
- Author:
- Christian Kohlschütter
-
Nested Class Summary
Nested classes/interfaces inherited from class AFTIPCSocketFactory
AFTIPCSocketFactory.ServiceAddressModifier and TypeClassDescriptionstatic classAlways connects sockets to the given TIPC type and instance.Nested classes/interfaces inherited from class AFSocketFactory
AFSocketFactory.FixedAddressSocketFactoryModifier and TypeClassDescriptionstatic final classA socket factory that always connects to a fixed socket address, no matter what. -
Constructor Summary
ConstructorsConstructorDescriptionServiceAddress(int type, int instance) Creates anAFTIPCSocketFactorythat always uses the given TIPC service type and instance, implying cluster scope. -
Method Summary
Modifier and TypeMethodDescriptionfinal AFTIPCSocketAddressaddressFromHost(String host, int port) Translates a "host" string (and port) to anAFSocketAddress.Methods inherited from class AFTIPCSocketFactory
configure, connectTo, createSocketModifier and TypeMethodDescriptionprotected AFTIPCSocketconfigure(AFTIPCSocket sock) Performs some optional configuration on a newly created socket.protected final AFTIPCSocketconnectTo(AFTIPCSocketAddress addr) Creates a newAFSocket, connected to the given address.final SocketMethods inherited from class AFSocketFactory
createSocket, createSocket, createSocket, createSocket, isInetAddressSupportedModifier and TypeMethodDescriptionfinal SocketcreateSocket(String host, int port) final SocketcreateSocket(String host, int port, InetAddress localHost, int localPort) final SocketcreateSocket(InetAddress address, int port) final SocketcreateSocket(InetAddress address, int port, InetAddress localAddress, int localPort) protected final booleanisInetAddressSupported(InetAddress address) Checks whether the givenInetAddressis supported by this socket factory.Methods inherited from class SocketFactory
getDefaultMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface AFSocketAddressFromHostname
isHostnameSupportedModifier and TypeMethodDescriptiondefault booleanisHostnameSupported(String host) Checks whether the given hostname is supported by this socket factory.
-
Constructor Details
-
ServiceAddress
public ServiceAddress(int type, int instance) Creates anAFTIPCSocketFactorythat always uses the given TIPC service type and instance, implying cluster scope.- Parameters:
type- The service type.instance- The service instance.
-
-
Method Details
-
addressFromHost
Description copied from interface:AFSocketAddressFromHostnameTranslates a "host" string (and port) to anAFSocketAddress.- Parameters:
host- The hostnameport- The port, or 0.- Returns:
- The
AFSocketAddress - Throws:
SocketException- If there was a problem converting the hostname
-