Java Doc for RLoginClient.java in  » Net » Apache-commons-net-1.4.1 » org » apache » commons » net » bsd » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Net » Apache commons net 1.4.1 » org.apache.commons.net.bsd 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.commons.net.bsd.RExecClient
   org.apache.commons.net.bsd.RCommandClient
      org.apache.commons.net.bsd.RLoginClient

RLoginClient
public class RLoginClient extends RCommandClient (Code)
RLoginClient is very similar to org.apache.commons.net.bsd.RCommandClient , from which it is derived, and uses the rcmd() facility implemented in RCommandClient to implement the functionality of the rlogin command that first appeared in 4.2BSD Unix. rlogin is a command used to login to a remote machine from a trusted host, sometimes without issuing a password. The trust relationship is the same as described in the documentation for org.apache.commons.net.bsd.RCommandClient .

As with virtually all of the client classes in org.apache.commons.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 RLoginClient.rlogin 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 org.apache.commons.net.bsd.RExecClient.disconnect 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 org.apache.commons.net.bsd.RExecClient.getInputStream getInputStream() . Unlike RExecClient and RCommandClient, it is not possible to tell the rlogind daemon to return the standard error stream over a separate connection. org.apache.commons.net.bsd.RExecClient.getErrorStream getErrorStream() will always return null. The standard input of the remote process can be written to through the output stream returned by org.apache.commons.net.bsd.RExecClient.getOutputStream getOutputSream() .


author:
   Daniel F. Savarese
See Also:   org.apache.commons.net.SocketClient
See Also:   RExecClient
See Also:   RCommandClient



Field Summary
final public static  intDEFAULT_PORT
     The default rlogin port.

Constructor Summary
public  RLoginClient()
     The default RLoginClient constructor.

Method Summary
public  voidrlogin(String localUsername, String remoteUsername, String terminalType, int terminalSpeed)
     Logins into a remote machine through the rlogind daemon on the server to which the RLoginClient is connected.
public  voidrlogin(String localUsername, String remoteUsername, String terminalType)
     Same as the other rlogin method, but no terminal speed is defined.

Field Detail
DEFAULT_PORT
final public static int DEFAULT_PORT(Code)
The default rlogin port. Set to 513 in BSD Unix and according to RFC 1282.




Constructor Detail
RLoginClient
public RLoginClient()(Code)
The default RLoginClient constructor. Initializes the default port to DEFAULT_PORT .




Method Detail
rlogin
public void rlogin(String localUsername, String remoteUsername, String terminalType, int terminalSpeed) throws IOException(Code)
Logins into a remote machine through the rlogind daemon on the server to which the RLoginClient is connected. After calling this method, you may interact with the remote login shell through its standard input and output streams. Standard error is sent over the same stream as standard output. You will typically be able to detect the termination of the remote login shell after reaching end of file on its standard output (accessible through RLoginClient.getInputStream getInputStream() . Disconnecting from the server or closing the process streams before reaching end of file will terminate the remote login shell in most cases.

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.


Parameters:
  localUsername - The user account on the local machine that istrying to login to the remote host.
Parameters:
  remoteUsername - The account name on the server that isbeing logged in to.
Parameters:
  terminalType - The name of the user's terminal (e.g., "vt100","network", etc.)
Parameters:
  terminalSpeed - The speed of the user's terminal, expressedas a baud rate or bps (e.g., 9600 or 38400)
exception:
  IOException - If the rlogin() attempt fails. The exceptionwill contain a message indicating the nature of the failure.




rlogin
public void rlogin(String localUsername, String remoteUsername, String terminalType) throws IOException(Code)
Same as the other rlogin method, but no terminal speed is defined.



Fields inherited from org.apache.commons.net.bsd.RCommandClient
final public static int DEFAULT_PORT(Code)(Java Doc)
final public static int MAX_CLIENT_PORT(Code)(Java Doc)
final public static int MIN_CLIENT_PORT(Code)(Java Doc)

Methods inherited from org.apache.commons.net.bsd.RCommandClient
InputStream _createErrorStream() throws IOException(Code)(Java Doc)
public void connect(InetAddress host, int port, InetAddress localAddr) throws SocketException, BindException, IOException(Code)(Java Doc)
public void connect(InetAddress host, int port) throws SocketException, IOException(Code)(Java Doc)
public void connect(String hostname, int port) throws SocketException, IOException(Code)(Java Doc)
public void connect(String hostname, int port, InetAddress localAddr) throws SocketException, IOException(Code)(Java Doc)
public void connect(InetAddress host, int port, InetAddress localAddr, int localPort) throws SocketException, IOException, IllegalArgumentException(Code)(Java Doc)
public void connect(String hostname, int port, InetAddress localAddr, int localPort) throws SocketException, IOException, IllegalArgumentException(Code)(Java Doc)
public void rcommand(String localUsername, String remoteUsername, String command, boolean separateErrorStream) throws IOException(Code)(Java Doc)
public void rcommand(String localUsername, String remoteUsername, String command) throws IOException(Code)(Java Doc)

Fields inherited from org.apache.commons.net.bsd.RExecClient
final public static int DEFAULT_PORT(Code)(Java Doc)
protected InputStream _errorStream_(Code)(Java Doc)

Methods inherited from org.apache.commons.net.bsd.RExecClient
InputStream _createErrorStream() throws IOException(Code)(Java Doc)
public void disconnect() throws IOException(Code)(Java Doc)
public InputStream getErrorStream()(Code)(Java Doc)
public InputStream getInputStream()(Code)(Java Doc)
public OutputStream getOutputStream()(Code)(Java Doc)
final public boolean isRemoteVerificationEnabled()(Code)(Java Doc)
public void rexec(String username, String password, String command, boolean separateErrorStream) throws IOException(Code)(Java Doc)
public void rexec(String username, String password, String command) throws IOException(Code)(Java Doc)
final public void setRemoteVerificationEnabled(boolean enable)(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.