Package org.jboss.net.sockets
Class QueuedClientSocketFactory
- java.lang.Object
-
- org.jboss.net.sockets.QueuedClientSocketFactory
-
- All Implemented Interfaces:
java.io.Externalizable,java.io.Serializable,java.rmi.server.RMIClientSocketFactory
public class QueuedClientSocketFactory extends java.lang.Object implements java.rmi.server.RMIClientSocketFactory, java.io.Externalizable- Version:
- $Revision$
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private longnumPermitsprivate java.util.concurrent.Semaphorepermits
-
Constructor Summary
Constructors Constructor Description QueuedClientSocketFactory()QueuedClientSocketFactory(long nPermits)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.net.SocketcreateSocket(java.lang.String host, int port)Create a server socket on the specified port (port 0 indicates an anonymous port).booleanequals(java.lang.Object obj)inthashCode()voidreadExternal(java.io.ObjectInput in)voidwriteExternal(java.io.ObjectOutput out)
-
-
-
Method Detail
-
createSocket
public java.net.Socket createSocket(java.lang.String host, int port) throws java.io.IOExceptionCreate a server socket on the specified port (port 0 indicates an anonymous port).- Specified by:
createSocketin interfacejava.rmi.server.RMIClientSocketFactory- Parameters:
port- the port number- Returns:
- the server socket on the specified port
- Throws:
java.io.IOException- if an I/O error occurs during server socket creation- Since:
- 1.2
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException- Specified by:
writeExternalin interfacejava.io.Externalizable- Throws:
java.io.IOException
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException- Specified by:
readExternalin interfacejava.io.Externalizable- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
-