public class DPCClient extends Object implements Closeable
Constructor and Description |
---|
DPCClient() |
DPCClient(ClientProtocol protocol) |
Modifier and Type | Method and Description |
---|---|
void |
close()
close all
|
void |
closeData()
close all data connections
|
void |
connect(InetAddress[] server,
int port,
String secret)
establishes an authorised pseudo FTP connection.
|
int |
getAuthTimeout() |
Socket |
getNewConnection()
open new connection
|
int |
getProtocolVersion() |
List<String> |
getServerFeatures() |
int |
getTimeout() |
boolean |
isConnected() |
List<Socket> |
openDataConnections(int numParCons)
opens data connections
|
String |
readControl()
read a single line from the control channel
|
void |
sendControl(String message)
send a message over the control channel
|
void |
setAuthTimeout(int authTimeout) |
void |
setTimeout(int timeout) |
public DPCClient()
public DPCClient(ClientProtocol protocol)
public void connect(InetAddress[] server, int port, String secret) throws IOException, AuthorizationFailureException
server
- - server addressesport
- - server portsecret
- - the authentication secretIOException
ProtocolViolationException
AuthorizationFailureException
public List<Socket> openDataConnections(int numParCons) throws IOException
numParCons
- number of parallel connectionsIOException
ProtocolViolationException
public Socket getNewConnection() throws IOException
IOException
public void closeData()
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public boolean isConnected()
public int getProtocolVersion()
public int getTimeout()
public void setTimeout(int timeout)
public int getAuthTimeout()
public void setAuthTimeout(int authTimeout)
public void sendControl(String message) throws IOException
message
- - the message to sendIOException
- when sending failedpublic String readControl() throws IOException
IOException
Copyright © 2010–2018 UNICORE. All rights reserved.