java.lang.Object
java.rmi.server.RMISocketFactory
org.newsclub.net.unix.rmi.AFRMISocketFactory
org.newsclub.net.unix.rmi.AFUNIXRMISocketFactory
- All Implemented Interfaces:
- Closeable,- Externalizable,- Serializable,- AutoCloseable,- RMIClientSocketFactory,- RMIServerSocketFactory
An 
RMISocketFactory that supports AFUNIXSockets.- Author:
- Christian Kohlschütter
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from class org.newsclub.net.unix.rmi.AFRMISocketFactoryAFRMISocketFactory.PortLease
- 
Constructor SummaryConstructorsConstructorDescriptionConstructor required per definition.AFUNIXRMISocketFactory(AFNaming naming, File socketDir) Creates a new socket factory.AFUNIXRMISocketFactory(AFNaming naming, File socketDir, RMIClientSocketFactory defaultClientFactory, RMIServerSocketFactory defaultServerFactory) Creates a new socket factory.AFUNIXRMISocketFactory(AFNaming naming, File socketDir, RMIClientSocketFactory defaultClientFactory, RMIServerSocketFactory defaultServerFactory, String socketPrefix, String socketSuffix) Creates a new socket factory.
- 
Method SummaryModifier and TypeMethodDescriptionvoidclose()booleanThe directory in which socket files are stored.inthashCode()protected final org.newsclub.net.unix.AFSocket<?> newConnectedSocket(org.newsclub.net.unix.AFSocketAddress addr) Creates a new socket that is connected to the given socket address.protected org.newsclub.net.unix.AFUNIXSocketAddressnewSocketAddress(int port) Creates a new socket address for the given RMI port.voidprotected AFNamingDeserializes information necessary to instantiate theAFNaminginstance.toString()voidprotected voidwriteNamingInstance(ObjectOutput out, AFNaming naming) Serializes information necessary to instantiate the givenAFNaminginstance.Methods inherited from class org.newsclub.net.unix.rmi.AFRMISocketFactorycreateServerSocket, createSocket, getNaming, isLocalServer, newPort, newPortLease, returnPortMethods inherited from class java.rmi.server.RMISocketFactorygetDefaultSocketFactory, getFailureHandler, getSocketFactory, setFailureHandler, setSocketFactory
- 
Constructor Details- 
AFUNIXRMISocketFactorypublic AFUNIXRMISocketFactory()Constructor required per definition.- See Also:
 
- 
AFUNIXRMISocketFactorypublic AFUNIXRMISocketFactory(AFNaming naming, File socketDir, RMIClientSocketFactory defaultClientFactory, RMIServerSocketFactory defaultServerFactory, String socketPrefix, String socketSuffix) Creates a new socket factory.- Parameters:
- naming- The- AFNaminginstance to use.
- socketDir- The directory to store the sockets in.
- defaultClientFactory- The default- RMIClientSocketFactory.
- defaultServerFactory- The default- RMIServerSocketFactory.
- socketPrefix- A string that will be inserted at the beginning of each socket filename, or- null.
- socketSuffix- A string that will be added to the end of each socket filename, or- null.
 
- 
AFUNIXRMISocketFactorypublic AFUNIXRMISocketFactory(AFNaming naming, File socketDir, RMIClientSocketFactory defaultClientFactory, RMIServerSocketFactory defaultServerFactory) Creates a new socket factory.- Parameters:
- naming- The- AFNaminginstance to use.
- socketDir- The directory to store the sockets in.
- defaultClientFactory- The default- RMIClientSocketFactory.
- defaultServerFactory- The default- RMIServerSocketFactory.
 
- 
AFUNIXRMISocketFactory
 
- 
- 
Method Details- 
readNamingInstanceDescription copied from class:AFRMISocketFactoryDeserializes information necessary to instantiate theAFNaminginstance.- Specified by:
- readNamingInstancein class- AFRMISocketFactory
- Parameters:
- in- The stream.
- Returns:
- The AFNaminginstance.
- Throws:
- IOException- on error.
 
- 
writeNamingInstanceDescription copied from class:AFRMISocketFactorySerializes information necessary to instantiate the givenAFNaminginstance.- Specified by:
- writeNamingInstancein class- AFRMISocketFactory
- Parameters:
- out- The stream.
- naming- The- AFNaminginstance.
- Throws:
- IOException- on error.
 
- 
readExternal- Specified by:
- readExternalin interface- Externalizable
- Overrides:
- readExternalin class- AFRMISocketFactory
- Throws:
- IOException
- ClassNotFoundException
 
- 
writeExternal- Specified by:
- writeExternalin interface- Externalizable
- Overrides:
- writeExternalin class- AFRMISocketFactory
- Throws:
- IOException
 
- 
hashCode
- 
equals
- 
getSocketDir
- 
newSocketAddressDescription copied from class:AFRMISocketFactoryCreates a new socket address for the given RMI port.- Specified by:
- newSocketAddressin class- AFRMISocketFactory
- Parameters:
- port- The port.
- Returns:
- The socket address.
- Throws:
- IOException- on error.
 
- 
newConnectedSocketprotected final org.newsclub.net.unix.AFSocket<?> newConnectedSocket(org.newsclub.net.unix.AFSocketAddress addr) throws IOException Description copied from class:AFRMISocketFactoryCreates a new socket that is connected to the given socket address.- Specified by:
- newConnectedSocketin class- AFRMISocketFactory
- Parameters:
- addr- The socket address.
- Returns:
- The connected socket.
- Throws:
- IOException- on error.
 
- 
toString
- 
close- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Overrides:
- closein class- AFRMISocketFactory
- Throws:
- IOException
 
 
-