All Packages Class Hierarchy This Package Previous Next Index
Class COM.ibm.net.InetProtocolClient
java.lang.Object
|
+----COM.ibm.net.InetProtocolClient
- public abstract class InetProtocolClient
- extends Object
The abstract superclass of all COM.ibm.net Internet protocol client
classes.
Copyright (c) Taligent, Inc. 1996 - 1997.
Copyright (c) IBM Corporation 1996 - 1997.
All Rights Reserved.
-
connected
- Indicates a connection to the server has been established.
-
debug
- Set debugging information on/off.
-
inStream
- Input stream through which server responses are received.
-
multiline
- Indicates multiple line server replies.
-
outStream
- Output stream through which server commands are sent.
-
port
- Server's port number.
-
rc_length
- Length of server return codes.
-
server
- Server's name or IP address.
-
servSock
- Socket used to connect to the server.
-
InetProtocolClient()
- Empty default constructor.
-
InetProtocolClient(int)
- Construct an InetProtocolClient with a port number and null
server name.
-
InetProtocolClient(String, int)
- Construct an InetProtocolClient with the protocol server and
port number.
-
checkReply(String, String)
- Confirm that the reply string begins with the specified confirmation
string.
-
close()
- Close the connection to the server.
-
connect()
- Establish a connection to the server.
-
getReply()
- Retrieve the response text from the server.
-
sendCommand(String)
- Send a command string to the server.
server
public String server
- Server's name or IP address.
port
public int port
- Server's port number.
connected
public boolean connected
- Indicates a connection to the server has been established.
debug
public transient boolean debug
- Set debugging information on/off.
servSock
protected transient Socket servSock
- Socket used to connect to the server.
inStream
protected transient BufferedReader inStream
- Input stream through which server responses are received.
outStream
protected transient DataOutputStream outStream
- Output stream through which server commands are sent.
rc_length
protected int rc_length
- Length of server return codes.
multiline
protected boolean multiline
- Indicates multiple line server replies.
InetProtocolClient
protected InetProtocolClient()
- Empty default constructor.
InetProtocolClient
protected InetProtocolClient(int port)
- Construct an InetProtocolClient with a port number and null
server name.
InetProtocolClient
protected InetProtocolClient(String server,
int port)
- Construct an InetProtocolClient with the protocol server and
port number.
connect
protected String connect() throws IOException, ConnectException
- Establish a connection to the server. Must be called prior to
performing server operations.
- Throws: IOException
- Could not connect to server
close
protected void close() throws IOException
- Close the connection to the server.
- Throws: IOException
- Could not close server connection
checkReply
protected void checkReply(String reply,
String success) throws IOException
- Confirm that the reply string begins with the specified confirmation
string.
- Parameters:
- reply - Server reponse to check
- success - String indicating success
- Throws: IOException
- Confirmation failed; exception contains the
reply string indicating the error
getReply
protected String getReply() throws IOException
- Retrieve the response text from the server.
- Returns:
- Response string; specific format depends on the protocol
but usually contains a reponse code followed by explanatory
text or requested data
- Throws: IOException
- Could not retrieve server response
sendCommand
protected String sendCommand(String cmd) throws IOException
- Send a command string to the server. A newline character is
sent following the command.
- Throws: IOException
- Could not send command to the server
All Packages Class Hierarchy This Package Previous Next Index