org.jboss.remoting.transport.rmi
Class RemotingRMIServerSocketFactory
java.lang.Object
org.jboss.remoting.transport.rmi.RemotingRMIServerSocketFactory
- All Implemented Interfaces:
- java.io.Serializable, java.rmi.server.RMIServerSocketFactory
public class RemotingRMIServerSocketFactory
- extends java.lang.Object
- implements java.rmi.server.RMIServerSocketFactory, java.io.Serializable
RemotingRMIServerSocketFactory provides two services to RMIServerInvoker.
- It can be parameterized by a host name, allowing
RMIServerInvoker to supply RMI
with a factory which creates server sockets bound to a specified host name as well as port.
- It can be parameterized by a
ServerSocketFactory allowing RMIServerInvoker
to supply RMI with a factory facility which creates specialized server sockets.
If the ServerSocketFactory parameter is specified, then the RemotingRMIServerSocketFactory
should be used with a matching instance of RemotingRMIClientSocketFactory with a compatible
SocketFactory.
If the ServerSocketFactory parameter is not specified, an instance of java.net.ServerSocket
will be created by default.
- Version:
- $Revision: 1216 $
Copyright (c) 2005
- Author:
- Ron Sigal
- See Also:
- Serialized Form
|
Field Summary |
protected static org.jboss.logging.Logger |
log
|
|
Method Summary |
java.net.ServerSocket |
createServerSocket(int port)
Creates a server socket bound to the host name passed to the constructor. |
boolean |
equals(java.lang.Object o)
Overrides the equals() method provided by the Object class. |
int |
hashCode()
Overrides hashCode() method provided by the Object class. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
log
protected static final org.jboss.logging.Logger log
RemotingRMIServerSocketFactory
public RemotingRMIServerSocketFactory(java.lang.String bindHost)
throws java.net.UnknownHostException
- Parameters:
bindHost - name of host to which all generated server sockets should be bound
- Throws:
java.net.UnknownHostException
RemotingRMIServerSocketFactory
public RemotingRMIServerSocketFactory(int backlog,
java.lang.String bindHost)
throws java.net.UnknownHostException
- Parameters:
backlog - to be passed to all generated server socketsbindHost - name of host to which all generated server sockets should be bound
- Throws:
java.net.UnknownHostException - if an IP address for bindHost cannot be found
RemotingRMIServerSocketFactory
public RemotingRMIServerSocketFactory(javax.net.ServerSocketFactory serverSocketFactory,
int backlog,
java.lang.String bindHost)
throws java.net.UnknownHostException
- Parameters:
serverSocketFactory - ServerSocketFactory for generating server socketsbacklog - to be passed to all generated server socketsbindHost - name of host to which all generated server sockets should be bound
- Throws:
java.net.UnknownHostException - if an IP address for bindHost cannot be found
RemotingRMIServerSocketFactory
public RemotingRMIServerSocketFactory(javax.net.ServerSocketFactory serverSocketFactory,
int backlog,
java.lang.String bindHost,
int timeout)
throws java.net.UnknownHostException
- Throws:
java.net.UnknownHostException
RemotingRMIServerSocketFactory
public RemotingRMIServerSocketFactory(java.lang.String bindHost,
int timeout)
throws java.net.UnknownHostException
- Throws:
java.net.UnknownHostException
createServerSocket
public java.net.ServerSocket createServerSocket(int port)
throws java.io.IOException
- Creates a server socket bound to the host name passed to the constructor. If a
ServerSocketFactory was passed to the constructor, it will be used to create the
server socket. Otherwise, an instance of java.net.ServerSocket will be created.
- Specified by:
createServerSocket in interface java.rmi.server.RMIServerSocketFactory
- Parameters:
port - the port to which the generated server socket should be bound
- Returns:
- a new
ServerSocket
- Throws:
java.io.IOException - if there is a problem creating a server socket
equals
public boolean equals(java.lang.Object o)
- Overrides the
equals() method provided by the Object class. It looks for
equality of binding host name and server socket factory parameters passed to constructor.
- Overrides:
equals in class java.lang.Object
- Parameters:
o - Object to which code is to be compared.
- Returns:
- true if and only if
o equals this
hashCode
public int hashCode()
- Overrides
hashCode() method provided by the Object class.
- Overrides:
hashCode in class java.lang.Object
- Returns:
- a hashcode for
this
Copyright © 1998-2005 JBoss Inc . All Rights Reserved.