org.newsclub.net.unix.rmi
Class AFUNIXRMISocketFactory

java.lang.Object
  extended by java.rmi.server.RMISocketFactory
      extended by org.newsclub.net.unix.rmi.AFUNIXRMISocketFactory
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable, java.rmi.server.RMIClientSocketFactory, java.rmi.server.RMIServerSocketFactory

public class AFUNIXRMISocketFactory
extends java.rmi.server.RMISocketFactory
implements java.io.Externalizable

An RMISocketFactory that supports AFUNIXSockets.

Author:
Christian Kohlsch??tter
See Also:
Serialized Form

Constructor Summary
AFUNIXRMISocketFactory()
          Constructor required per definition.
AFUNIXRMISocketFactory(AFUNIXNaming naming, java.io.File socketDir)
           
AFUNIXRMISocketFactory(AFUNIXNaming naming, java.io.File socketDir, java.rmi.server.RMIClientSocketFactory defaultClientFactory, java.rmi.server.RMIServerSocketFactory defaultServerFactory)
           
AFUNIXRMISocketFactory(AFUNIXNaming naming, java.io.File socketDir, java.rmi.server.RMIClientSocketFactory defaultClientFactory, java.rmi.server.RMIServerSocketFactory defaultServerFactory, java.lang.String socketPrefix, java.lang.String socketSuffix)
           
 
Method Summary
 void close()
           
 java.net.ServerSocket createServerSocket(int port)
           
 java.net.Socket createSocket(java.lang.String host, int port)
           
 boolean equals(java.lang.Object other)
           
 java.io.File getSocketDir()
           
 int hashCode()
           
protected  int newPort()
           
 void readExternal(java.io.ObjectInput in)
           
protected  void returnPort(int port)
           
 void writeExternal(java.io.ObjectOutput out)
           
 
Methods inherited from class java.rmi.server.RMISocketFactory
getDefaultSocketFactory, getFailureHandler, getSocketFactory, setFailureHandler, setSocketFactory
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AFUNIXRMISocketFactory

public AFUNIXRMISocketFactory()
Constructor required per definition.

See Also:
RMISocketFactory

AFUNIXRMISocketFactory

public AFUNIXRMISocketFactory(AFUNIXNaming naming,
                              java.io.File socketDir)
                       throws java.io.IOException
Throws:
java.io.IOException

AFUNIXRMISocketFactory

public AFUNIXRMISocketFactory(AFUNIXNaming naming,
                              java.io.File socketDir,
                              java.rmi.server.RMIClientSocketFactory defaultClientFactory,
                              java.rmi.server.RMIServerSocketFactory defaultServerFactory)
                       throws java.io.IOException
Throws:
java.io.IOException

AFUNIXRMISocketFactory

public AFUNIXRMISocketFactory(AFUNIXNaming naming,
                              java.io.File socketDir,
                              java.rmi.server.RMIClientSocketFactory defaultClientFactory,
                              java.rmi.server.RMIServerSocketFactory defaultServerFactory,
                              java.lang.String socketPrefix,
                              java.lang.String socketSuffix)
                       throws java.io.IOException
Throws:
java.io.IOException
Method Detail

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object

createSocket

public java.net.Socket createSocket(java.lang.String host,
                                    int port)
                             throws java.io.IOException
Specified by:
createSocket in interface java.rmi.server.RMIClientSocketFactory
Specified by:
createSocket in class java.rmi.server.RMISocketFactory
Throws:
java.io.IOException

getSocketDir

public java.io.File getSocketDir()

close

public void close()

newPort

protected int newPort()
               throws java.io.IOException
Throws:
java.io.IOException

returnPort

protected void returnPort(int port)
                   throws java.io.IOException
Throws:
java.io.IOException

createServerSocket

public java.net.ServerSocket createServerSocket(int port)
                                         throws java.io.IOException
Specified by:
createServerSocket in interface java.rmi.server.RMIServerSocketFactory
Specified by:
createServerSocket in class java.rmi.server.RMISocketFactory
Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException