Java Doc for Telnet.java in  » Net » Apache-commons-net-1.4.1 » org » apache » commons » net » telnet » 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.telnet 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.commons.net.SocketClient
      org.apache.commons.net.telnet.Telnet

All known Subclasses:   org.apache.commons.net.telnet.TelnetClient,
Telnet
class Telnet extends SocketClient (Code)

author:
   Daniel F. Savarese
author:
   Bruno D'Avanzo


Field Summary
final static  intDEFAULT_PORT
    
final protected static  intTERMINAL_TYPE
    
final protected static  intTERMINAL_TYPE_IS
    
final protected static  intTERMINAL_TYPE_SEND
    
final static  byte[]_COMMAND_AYT
    
final static  byte[]_COMMAND_DO
    
final static  byte[]_COMMAND_DONT
    
final static  byte[]_COMMAND_IS
    
final static  byte[]_COMMAND_SB
    
final static  byte[]_COMMAND_SE
    
final static  byte[]_COMMAND_WILL
    
final static  byte[]_COMMAND_WONT
    
final static  int_WILL_MASK_DO_MASK_REQUESTED_WILL_MASK_REQUESTED_DO_MASK
    
 int[]_doResponse_willResponse_options
    
final static  booleandebug
    
final static  booleandebugoptions
    

Constructor Summary
 Telnet()
    
 Telnet(String termtype)
     This constructor lets you specify the terminal type.


Parameters:
  termtype - - terminal type to be negotiated (ej.


Method Summary
protected  void_connectAction_()
     Called upon connection.
final synchronized  void_processAYTResponse()
    
 void_processDo(int option)
     Processes a DO request.
 void_processDont(int option)
     Processes a DONT request.
 void_processSuboption(int suboption, int suboptionLength)
     Processes a suboption negotiation.
 void_processWill(int option)
     Processes a WILL request.
 void_processWont(int option)
     Processes a WONT request.
 void_registerSpyStream(OutputStream spystream)
     Registers an OutputStream for spying what's going on in the Telnet session.
final synchronized  void_requestDo(int option)
     Requests a DO.
final synchronized  void_requestDont(int option)
     Requests a DONT.
final synchronized  void_requestWill(int option)
     Requests a WILL.
final synchronized  void_requestWont(int option)
     Requests a WONT.
 boolean_requestedDo(int option)
     Looks for the state of the option.
 boolean_requestedDont(int option)
     Looks for the state of the option.
 boolean_requestedWill(int option)
     Looks for the state of the option.
 boolean_requestedWont(int option)
     Looks for the state of the option.
final  boolean_sendAYT(long timeout)
     Sends an Are You There sequence and waits for the result.
final synchronized  void_sendByte(int b)
     Sends a byte.
final synchronized  void_sendDo(int option)
     Sends a DO.
final synchronized  void_sendDont(int option)
     Sends a DONT.
final synchronized  void_sendSubnegotiation(int subn)
     Manages subnegotiation for Terminal Type.
final synchronized  void_sendTerminalType()
     Sends terminal type information.
final synchronized  void_sendWill(int option)
     Sends a WILL.
final synchronized  void_sendWont(int option)
     Sends a WONT.
 void_setDo(int option)
     Sets the state of the option.
 void_setDont(int option)
     Sets the state of the option.
 void_setWantDo(int option)
     Sets the state of the option.
 void_setWantDont(int option)
     Sets the state of the option.
 void_setWantWill(int option)
     Sets the state of the option.
 void_setWantWont(int option)
     Sets the state of the option.
 void_setWill(int option)
     Sets the state of the option.
 void_setWont(int option)
     Sets the state of the option.
 void_spyRead(int ch)
     Sends a read char on the spy stream.
 void_spyWrite(int ch)
     Sends a written char on the spy stream.
 boolean_stateIsDo(int option)
     Looks for the state of the option.
 boolean_stateIsDont(int option)
     Looks for the state of the option.
 boolean_stateIsWill(int option)
     Looks for the state of the option.
 boolean_stateIsWont(int option)
     Looks for the state of the option.
 void_stopSpyStream()
     Stops spying this Telnet.
 voidaddOptionHandler(TelnetOptionHandler opthand)
     Registers a new TelnetOptionHandler for this telnet to use.
 voiddeleteOptionHandler(int optcode)
     Unregisters a TelnetOptionHandler.
public  voidregisterNotifHandler(TelnetNotificationHandler notifhand)
     Registers a notification handler to which will be sent notifications of received telnet option negotiation commands.
public  voidunregisterNotifHandler()
     Unregisters the current notification handler.

Field Detail
DEFAULT_PORT
final static int DEFAULT_PORT(Code)



TERMINAL_TYPE
final protected static int TERMINAL_TYPE(Code)
Terminal type option



TERMINAL_TYPE_IS
final protected static int TERMINAL_TYPE_IS(Code)
Is (for subnegotiation)



TERMINAL_TYPE_SEND
final protected static int TERMINAL_TYPE_SEND(Code)
Send (for subnegotiation)



_COMMAND_AYT
final static byte[] _COMMAND_AYT(Code)
AYT sequence



_COMMAND_DO
final static byte[] _COMMAND_DO(Code)



_COMMAND_DONT
final static byte[] _COMMAND_DONT(Code)



_COMMAND_IS
final static byte[] _COMMAND_IS(Code)
Is sequence (for subnegotiation)



_COMMAND_SB
final static byte[] _COMMAND_SB(Code)



_COMMAND_SE
final static byte[] _COMMAND_SE(Code)



_COMMAND_WILL
final static byte[] _COMMAND_WILL(Code)



_COMMAND_WONT
final static byte[] _COMMAND_WONT(Code)



_WILL_MASK_DO_MASK_REQUESTED_WILL_MASK_REQUESTED_DO_MASK
final static int _WILL_MASK_DO_MASK_REQUESTED_WILL_MASK_REQUESTED_DO_MASK(Code)



_doResponse_willResponse_options
int[] _doResponse_willResponse_options(Code)



debug
final static boolean debug(Code)



debugoptions
final static boolean debugoptions(Code)




Constructor Detail
Telnet
Telnet()(Code)
Empty Constructor



Telnet
Telnet(String termtype)(Code)
This constructor lets you specify the terminal type.


Parameters:
  termtype - - terminal type to be negotiated (ej. VT100)





Method Detail
_connectAction_
protected void _connectAction_() throws IOException(Code)
Called upon connection.


throws:
  IOException - - Exception in I/O.




_processAYTResponse
final synchronized void _processAYTResponse()(Code)
Processes the response of an AYT



_processDo
void _processDo(int option) throws IOException(Code)
Processes a DO request.


throws:
  IOException - - Exception in I/O.


Parameters:
  option - - option code to be set.




_processDont
void _processDont(int option) throws IOException(Code)
Processes a DONT request.


throws:
  IOException - - Exception in I/O.


Parameters:
  option - - option code to be set.




_processSuboption
void _processSuboption(int suboption, int suboptionLength) throws IOException(Code)
Processes a suboption negotiation.


throws:
  IOException - - Exception in I/O.


Parameters:
  suboption - - subnegotiation data received
Parameters:
  suboptionLength - - length of data received




_processWill
void _processWill(int option) throws IOException(Code)
Processes a WILL request.


throws:
  IOException - - Exception in I/O.


Parameters:
  option - - option code to be set.




_processWont
void _processWont(int option) throws IOException(Code)
Processes a WONT request.


throws:
  IOException - - Exception in I/O.


Parameters:
  option - - option code to be set.




_registerSpyStream
void _registerSpyStream(OutputStream spystream)(Code)
Registers an OutputStream for spying what's going on in the Telnet session.


Parameters:
  spystream - - OutputStream on which session activitywill be echoed.




_requestDo
final synchronized void _requestDo(int option) throws IOException(Code)
Requests a DO.


throws:
  IOException - - Exception in I/O.


Parameters:
  option - - Option code.




_requestDont
final synchronized void _requestDont(int option) throws IOException(Code)
Requests a DONT.


throws:
  IOException - - Exception in I/O.


Parameters:
  option - - Option code.




_requestWill
final synchronized void _requestWill(int option) throws IOException(Code)
Requests a WILL.


throws:
  IOException - - Exception in I/O.


Parameters:
  option - - Option code.




_requestWont
final synchronized void _requestWont(int option) throws IOException(Code)
Requests a WONT.


throws:
  IOException - - Exception in I/O.


Parameters:
  option - - Option code.




_requestedDo
boolean _requestedDo(int option)(Code)
Looks for the state of the option.

returns true if a do has been reuqested


Parameters:
  option - - option code to be looked up.




_requestedDont
boolean _requestedDont(int option)(Code)
Looks for the state of the option.

returns true if a dont has been reuqested


Parameters:
  option - - option code to be looked up.




_requestedWill
boolean _requestedWill(int option)(Code)
Looks for the state of the option.

returns true if a will has been reuqested


Parameters:
  option - - option code to be looked up.




_requestedWont
boolean _requestedWont(int option)(Code)
Looks for the state of the option.

returns true if a wont has been reuqested


Parameters:
  option - - option code to be looked up.




_sendAYT
final boolean _sendAYT(long timeout) throws IOException, IllegalArgumentException, InterruptedException(Code)
Sends an Are You There sequence and waits for the result.


throws:
  IOException - - Exception in I/O.
throws:
  IllegalArgumentException - - Illegal argument
throws:
  InterruptedException - - Interrupted during wait.


Parameters:
  timeout - - Time to wait for a response (millis.)

true if AYT received a response, false otherwise




_sendByte
final synchronized void _sendByte(int b) throws IOException(Code)
Sends a byte.


throws:
  IOException - - Exception in I/O.


Parameters:
  b - - byte to send




_sendDo
final synchronized void _sendDo(int option) throws IOException(Code)
Sends a DO.


throws:
  IOException - - Exception in I/O.


Parameters:
  option - - Option code.




_sendDont
final synchronized void _sendDont(int option) throws IOException(Code)
Sends a DONT.


throws:
  IOException - - Exception in I/O.


Parameters:
  option - - Option code.




_sendSubnegotiation
final synchronized void _sendSubnegotiation(int subn) throws IOException(Code)
Manages subnegotiation for Terminal Type.


throws:
  IOException - - Exception in I/O.


Parameters:
  subn - - subnegotiation data to be sent




_sendTerminalType
final synchronized void _sendTerminalType() throws IOException(Code)
Sends terminal type information.


throws:
  IOException - - Exception in I/O.




_sendWill
final synchronized void _sendWill(int option) throws IOException(Code)
Sends a WILL.


throws:
  IOException - - Exception in I/O.


Parameters:
  option - - Option code.




_sendWont
final synchronized void _sendWont(int option) throws IOException(Code)
Sends a WONT.


throws:
  IOException - - Exception in I/O.


Parameters:
  option - - Option code.




_setDo
void _setDo(int option)(Code)
Sets the state of the option.


Parameters:
  option - - option code to be set.




_setDont
void _setDont(int option)(Code)
Sets the state of the option.


Parameters:
  option - - option code to be set.




_setWantDo
void _setWantDo(int option)(Code)
Sets the state of the option.


Parameters:
  option - - option code to be set.




_setWantDont
void _setWantDont(int option)(Code)
Sets the state of the option.


Parameters:
  option - - option code to be set.




_setWantWill
void _setWantWill(int option)(Code)
Sets the state of the option.


Parameters:
  option - - option code to be set.




_setWantWont
void _setWantWont(int option)(Code)
Sets the state of the option.


Parameters:
  option - - option code to be set.




_setWill
void _setWill(int option)(Code)
Sets the state of the option.


Parameters:
  option - - option code to be set.




_setWont
void _setWont(int option)(Code)
Sets the state of the option.


Parameters:
  option - - option code to be set.




_spyRead
void _spyRead(int ch)(Code)
Sends a read char on the spy stream.


Parameters:
  ch - - character read from the session




_spyWrite
void _spyWrite(int ch)(Code)
Sends a written char on the spy stream.


Parameters:
  ch - - character written to the session




_stateIsDo
boolean _stateIsDo(int option)(Code)
Looks for the state of the option.

returns true if a do has been acknowledged


Parameters:
  option - - option code to be looked up.




_stateIsDont
boolean _stateIsDont(int option)(Code)
Looks for the state of the option.

returns true if a dont has been acknowledged


Parameters:
  option - - option code to be looked up.




_stateIsWill
boolean _stateIsWill(int option)(Code)
Looks for the state of the option.

returns true if a will has been acknowledged


Parameters:
  option - - option code to be looked up.




_stateIsWont
boolean _stateIsWont(int option)(Code)
Looks for the state of the option.

returns true if a wont has been acknowledged


Parameters:
  option - - option code to be looked up.




_stopSpyStream
void _stopSpyStream()(Code)
Stops spying this Telnet.




addOptionHandler
void addOptionHandler(TelnetOptionHandler opthand) throws InvalidTelnetOptionException(Code)
Registers a new TelnetOptionHandler for this telnet to use.


throws:
  InvalidTelnetOptionException - - The option code is invalid.


Parameters:
  opthand - - option handler to be registered.




deleteOptionHandler
void deleteOptionHandler(int optcode) throws InvalidTelnetOptionException(Code)
Unregisters a TelnetOptionHandler.


throws:
  InvalidTelnetOptionException - - The option code is invalid.


Parameters:
  optcode - - Code of the option to be unregistered.




registerNotifHandler
public void registerNotifHandler(TelnetNotificationHandler notifhand)(Code)
Registers a notification handler to which will be sent notifications of received telnet option negotiation commands.


Parameters:
  notifhand - - TelnetNotificationHandler to be registered




unregisterNotifHandler
public void unregisterNotifHandler()(Code)
Unregisters the current notification handler.




Fields inherited from org.apache.commons.net.SocketClient
final public static String NETASCII_EOL(Code)(Java Doc)
protected int _defaultPort_(Code)(Java Doc)
protected InputStream _input_(Code)(Java Doc)
protected boolean _isConnected_(Code)(Java Doc)
protected OutputStream _output_(Code)(Java Doc)
protected SocketFactory _socketFactory_(Code)(Java Doc)
protected Socket _socket_(Code)(Java Doc)
protected int _timeout_(Code)(Java Doc)

Methods inherited from org.apache.commons.net.SocketClient
protected void _connectAction_() throws 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(InetAddress host, int port, InetAddress localAddr, int localPort) throws SocketException, IOException(Code)(Java Doc)
public void connect(String hostname, int port, InetAddress localAddr, int localPort) throws SocketException, IOException(Code)(Java Doc)
public void connect(InetAddress host) throws SocketException, IOException(Code)(Java Doc)
public void connect(String hostname) throws SocketException, IOException(Code)(Java Doc)
public void disconnect() throws IOException(Code)(Java Doc)
public int getDefaultPort()(Code)(Java Doc)
public int getDefaultTimeout()(Code)(Java Doc)
public InetAddress getLocalAddress()(Code)(Java Doc)
public int getLocalPort()(Code)(Java Doc)
public InetAddress getRemoteAddress()(Code)(Java Doc)
public int getRemotePort()(Code)(Java Doc)
public int getSoLinger() throws SocketException(Code)(Java Doc)
public int getSoTimeout() throws SocketException(Code)(Java Doc)
public boolean getTcpNoDelay() throws SocketException(Code)(Java Doc)
public boolean isConnected()(Code)(Java Doc)
public void setDefaultPort(int port)(Code)(Java Doc)
public void setDefaultTimeout(int timeout)(Code)(Java Doc)
public void setSoLinger(boolean on, int val) throws SocketException(Code)(Java Doc)
public void setSoTimeout(int timeout) throws SocketException(Code)(Java Doc)
public void setSocketFactory(SocketFactory factory)(Code)(Java Doc)
public void setTcpNoDelay(boolean on) throws SocketException(Code)(Java Doc)
public boolean verifyRemote(Socket socket)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(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.