public abstract class UFTPBaseRequest extends Object
Modifier and Type | Field and Description |
---|---|
protected static org.apache.log4j.Logger |
logger |
Modifier | Constructor and Description |
---|---|
protected |
UFTPBaseRequest(InetAddress[] clientAddress,
String user,
String secret) |
Modifier and Type | Method and Description |
---|---|
InetAddress[] |
getClient()
get the client IP address
|
long |
getCreatedTime() |
protected abstract String |
getRequestType() |
String |
getSecret()
returns the secret
|
String |
getUser() |
static Properties |
loadProperties(String props) |
protected String |
readResponse(InputStream is) |
String |
sendTo(InetAddress server,
int port)
utility method to send this job to a server.
|
String |
sendTo(Socket s)
utility method to send this job to a socket
|
void |
writeEncoded(OutputStream os)
writes out the request in properties format 'client-ip=...' 'send=...' etc
|
protected UFTPBaseRequest(InetAddress[] clientAddress, String user, String secret)
user
- secret
- UnknownHostException
public static Properties loadProperties(String props) throws IOException
IOException
public void writeEncoded(OutputStream os) throws IOException
os
- output stream where the options are written toIOException
protected abstract String getRequestType()
public String sendTo(InetAddress server, int port) throws IOException
server
- server addressport
- server portIOException
public String sendTo(Socket s) throws IOException
s
- socket to send the job toIOException
protected String readResponse(InputStream is) throws IOException
IOException
public InetAddress[] getClient()
public String getUser()
public long getCreatedTime()
public String getSecret()
Copyright © 2010–2018 UNICORE. All rights reserved.