Modifier and Type | Method and Description |
---|---|
void |
addNewDataConnection(String cmd) |
void |
close()
quietly close all sockets
|
void |
closeData()
quietly close all our data connections
|
protected Socket |
createNewDataConnection()
make a new (data) connection
|
Socket |
createNewDataConnection(String cmd) |
UFTPTransferRequest |
establish()
establish the connection using the pseudo FTP protocol
|
InetAddress |
getAddress() |
List<Socket> |
getDataSockets() |
Collection<String> |
getFeatures() |
List<UFTPTransferRequest> |
getJobsForClientAddress(InetAddress ia) |
List<UFTPTransferRequest> |
getJobsForControlSocketAddress() |
int |
getProtocolVersion() |
List<Socket> |
openDataConnections(int maxParCons)
Server part of opening data connections.
|
String |
readControl()
read a line from the control connection
|
void |
sendControl(String message)
send a message over the control channel
|
void |
sendError(int code,
String message)
sends error message (with code) over the control connection
|
void |
sendError(String message)
sends error message (with code 500) over the control connection
|
void |
setControlTimeout(int timeout)
set the timeout on the control connection
|
public Collection<String> getFeatures()
public UFTPTransferRequest establish() throws AuthorizationFailureException, IOException
public List<Socket> openDataConnections(int maxParCons) throws IOException
ProtocolViolationException
is thrown when the
client does not adhere to the protocol.maxParCons
- maximum number of data connectionsIOException
ProtocolViolationException
- when protocol is violated, or data
connections already existpublic void closeData()
public void close()
public InetAddress getAddress()
public void sendControl(String message) throws IOException
message
- - the message to sendIOException
- on socket errorspublic void sendError(String message) throws IOException
message
- message to sendIOException
- thrown upon socket errorpublic void sendError(int code, String message) throws IOException
code
- - error codemessage
- - message to sendIOException
- thrown upon socket errorpublic String readControl() throws IOException
IOException
public void setControlTimeout(int timeout) throws SocketException
timeout
- SocketException
protected Socket createNewDataConnection() throws IOException
IOException
public Socket createNewDataConnection(String cmd) throws IOException
IOException
public void addNewDataConnection(String cmd) throws IOException
IOException
public List<UFTPTransferRequest> getJobsForClientAddress(InetAddress ia)
public List<UFTPTransferRequest> getJobsForControlSocketAddress()
public int getProtocolVersion()
Copyright © 2010–2016 UNICORE. All rights reserved.