com.jscape.inet.util
Class ServerSocketUtil
java.lang.Object
com.jscape.inet.util.ServerSocketUtil
public class ServerSocketUtil
- extends java.lang.Object
Creates a ServerSocket which is going to listen a port from a FTP Server. The
port number available has to be between the port range of the dataPortStart
and the dataPortEnd arguments
This class is used when the user is connecting to a FTP Server in Active
mode.
- Author:
- Alvaro
Method Summary |
static java.net.ServerSocket |
createServerSocket(int dataPortStart,
int dataPortEnd)
Creates a server socket which is going to listen a port between the port
range from dataPortStart to dataPortEnd
|
static java.net.ServerSocket |
createServerSocket(javax.net.ServerSocketFactory factory,
int dataPortStart,
int dataPortEnd)
Creates a server socket which is going to listen a port between the port
range from dataPortStart to dataPortEnd. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ServerSocketUtil
public ServerSocketUtil()
createServerSocket
public static java.net.ServerSocket createServerSocket(int dataPortStart,
int dataPortEnd)
throws java.lang.Exception
- Creates a server socket which is going to listen a port between the port
range from
dataPortStart
to dataPortEnd
- Parameters:
dataPortStart
- The start data port rangedataPortEnd
- The end data port range
- Returns:
- Returns a server socket which is listing a port between the port range
- Throws:
java.lang.Exception
- Throws a exception if was not found a port available
createServerSocket
public static java.net.ServerSocket createServerSocket(javax.net.ServerSocketFactory factory,
int dataPortStart,
int dataPortEnd)
throws java.lang.Exception
- Creates a server socket which is going to listen a port between the port
range from
dataPortStart
to dataPortEnd.
The method uses a ServerSocketFatory factory
to create the server
socket
- Parameters:
factory
- The factory used to create a ServerSocketdataPortStart
- The start data port rangedataPortEnd
- The end data port range
- Returns:
- Return a server socket which is listing a port between the port range
- Throws:
java.lang.Exception
- Throws a exception if was not found a port available
Copyright © JSCAPE LLC. 1999-2011. All Rights Reserved