All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object
|
+----com.oroinc.net.SocketClient
|
+----com.oroinc.net.bsd.RExecClient
|
+----com.oroinc.net.bsd.RCommandClient
|
+----com.oroinc.net.bsd.RLoginClient
As with virtually all of the client classes in com.oroinc.net, this class derives from SocketClient. But it relies on the connection methods defined in RcommandClient which ensure that the local Socket will originate from an acceptable rshell port. The way to use RLoginClient is to first connect to the server, call the rlogin() method, and then fetch the connection's input and output streams. Interaction with the remote command is controlled entirely through the I/O streams. Once you have finished processing the streams, you should invoke disconnect() to clean up properly.
The standard output and standard error streams of the remote process are transmitted over the same connection, readable from the input stream returned by getInputStream() . Unlike RExecClient and RCommandClient, it is not possible to tell the rlogind daemon to return the standard error stream over a separate connection. getErrorStream() will always return null. The standard input of the remote process can be written to through the output stream returned by getOutputSream() .
Copyright © 1998 Original Reusable Objects, Inc. All rights reserved.
public static final int DEFAULT_PORT
public RLoginClient()
DEFAULT_PORT .
public void rlogin(String localUsername,
String remoteUsername,
String terminalType,
int terminalSpeed) throws IOException
If user authentication fails, the rlogind daemon will request that a password be entered interactively. You will be able to read the prompt from the output stream of the RLoginClient and write the password to the input stream of the RLoginClient.
public void rlogin(String localUsername,
String remoteUsername,
String terminalType) throws IOException
All Packages Class Hierarchy This Package Previous Next Index