public class DPCServer extends Object
Modifier and Type | Class and Description |
---|---|
class |
DPCServer.Connection |
Modifier and Type | Field and Description |
---|---|
protected static String[] |
responses
String-Array holding response messages used to establish the pseudo-FTP
connection
|
static String |
VER |
Constructor and Description |
---|
DPCServer(InetAddress ip,
int port,
int backlog,
JobStore jobStore,
String advertiseAddress,
PortManager pm,
boolean checkClientIP)
create a new server listening on the given interface
|
Modifier and Type | Method and Description |
---|---|
DPCServer.Connection |
accept()
Waits for incoming client
|
void |
close()
close the server socket, disallowing any new connections.
|
static String[] |
getFeatures()
get the list of features supported by this server
|
String |
getHost() |
int |
getPort() |
int |
getTimeout() |
boolean |
isCheckClientIP() |
void |
setCheckClientIP(boolean checkIP) |
void |
setTimeout(int timeout) |
public static final String VER
protected static final String[] responses
public DPCServer(InetAddress ip, int port, int backlog, JobStore jobStore, String advertiseAddress, PortManager pm, boolean checkClientIP) throws IOException
ip
- server interface to bind to, if null
, all
interfaces are usedport
- listen portbacklog
- maximum backlog of incoming connectionsadvertiseAddress
- Advertise this address as our own address in the control
connectionpm
- - PortManagerIOException
public DPCServer.Connection accept() throws IOException
IOException
- on IO errors or if the connection is from a client address
for which no UFTPTransferRequest
existspublic void close() throws IOException
IOException
- as thrown from ServerSocket.close()public int getTimeout()
public void setTimeout(int timeout)
public void setCheckClientIP(boolean checkIP)
public int getPort()
public String getHost()
public boolean isCheckClientIP()
public static String[] getFeatures()
Copyright © 2010–2018 UNICORE. All rights reserved.