JBoss Common Classes 2.2.17.GA

org.jboss.net.sockets
Class DefaultClientSocketFactory

java.lang.Object
  extended by org.jboss.net.sockets.DefaultClientSocketFactory
All Implemented Interfaces:
Serializable, RMIClientSocketFactory

public class DefaultClientSocketFactory
extends Object
implements RMIClientSocketFactory, Serializable

A RMIClientSocketFactory that adds a bind address override of the server host to control what the address the client uses.

Version:
$Revision: 30203 $
Author:
Scott.Stark@jboss.org
See Also:
Serialized Form

Constructor Summary
DefaultClientSocketFactory()
           
 
Method Summary
 Socket createSocket(String host, int port)
          Create a server socket on the specified port (port 0 indicates an anonymous port).
 boolean equals(Object obj)
           
 String getBindAddress()
           
 int hashCode()
           
 void setBindAddress(String host)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultClientSocketFactory

public DefaultClientSocketFactory()
Method Detail

getBindAddress

public String getBindAddress()

setBindAddress

public void setBindAddress(String host)
                    throws UnknownHostException
Throws:
UnknownHostException

createSocket

public Socket createSocket(String host,
                           int port)
                    throws IOException
Create a server socket on the specified port (port 0 indicates an anonymous port).

Specified by:
createSocket in interface RMIClientSocketFactory
Parameters:
port - the port number
Returns:
the server socket on the specified port
Throws:
IOException - if an I/O error occurs during server socket creation
Since:
1.2

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

JBoss Common Classes 2.2.17.GA

Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.