Java Doc for TelnetOptionHandler.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.telnet.TelnetOptionHandler

All known Subclasses:   org.apache.commons.net.telnet.SuppressGAOptionHandler,  org.apache.commons.net.telnet.TerminalTypeOptionHandler,  org.apache.commons.net.telnet.EchoOptionHandler,  org.apache.commons.net.telnet.SimpleOptionHandler,
TelnetOptionHandler
abstract public class TelnetOptionHandler (Code)
The TelnetOptionHandler class is the base class to be used for implementing handlers for telnet options.

TelnetOptionHandler implements basic option handling functionality and defines abstract methods that must be implemented to define subnegotiation behaviour.


author:
   Bruno D'Avanzo




Constructor Summary
public  TelnetOptionHandler(int optcode, boolean initlocal, boolean initremote, boolean acceptlocal, boolean acceptremote)
     Constructor for the TelnetOptionHandler.

Method Summary
abstract public  int[]answerSubnegotiation(int suboptionData, int suboptionLength)
     Method called upon reception of a subnegotiation for this option coming from the other end. Must be implemented by the actual TelnetOptionHandler to specify which response must be sent for the subnegotiation request.


Parameters:
  suboptionData - - the sequence received, whithout IAC SB & IAC SE
Parameters:
  suboptionLength - - the length of data in suboption_data

response to be sent to the subnegotiation sequence.

public  booleangetAcceptLocal()
     Returns a boolean indicating whether to accept a DO request coming from the other end.
public  booleangetAcceptRemote()
     Returns a boolean indicating whether to accept a WILL request coming from the other end.
 booleangetDo()
     Returns a boolean indicating whether a DO request sent to the other side has been acknowledged.
public  booleangetInitLocal()
     Returns a boolean indicating whether to send a WILL request to the other end upon connection.
public  booleangetInitRemote()
     Returns a boolean indicating whether to send a DO request to the other end upon connection.
public  intgetOptionCode()
     Returns the option code for this option.
 booleangetWill()
     Returns a boolean indicating whether a WILL request sent to the other side has been acknowledged.
public  voidsetAcceptLocal(boolean accept)
     Set behaviour of the option for DO requests coming from the other end.
public  voidsetAcceptRemote(boolean accept)
     Set behaviour of the option for WILL requests coming from the other end.
 voidsetDo(boolean state)
     Tells this option whether a DO request sent to the other side has been acknowledged (invoked by TelnetClient).
public  voidsetInitLocal(boolean init)
     Tells this option whether to send a WILL request upon connection.
public  voidsetInitRemote(boolean init)
     Tells this option whether to send a DO request upon connection.
 voidsetWill(boolean state)
     Tells this option whether a WILL request sent to the other side has been acknowledged (invoked by TelnetClient).
abstract public  int[]startSubnegotiationLocal()
     This method is invoked whenever this option is acknowledged active on the local end (TelnetClient sent a WILL, remote side sent a DO). The method is used to specify a subnegotiation sequence that will be sent by TelnetClient when the option is activated.

subnegotiation sequence to be sent by TelnetClient.

abstract public  int[]startSubnegotiationRemote()
     This method is invoked whenever this option is acknowledged active on the remote end (TelnetClient sent a DO, remote side sent a WILL). The method is used to specify a subnegotiation sequence that will be sent by TelnetClient when the option is activated.

subnegotiation sequence to be sent by TelnetClient.



Constructor Detail
TelnetOptionHandler
public TelnetOptionHandler(int optcode, boolean initlocal, boolean initremote, boolean acceptlocal, boolean acceptremote)(Code)
Constructor for the TelnetOptionHandler. Allows defining desired initial setting for local/remote activation of this option and behaviour in case a local/remote activation request for this option is received.


Parameters:
  optcode - - Option code.
Parameters:
  initlocal - - if set to true, a WILL is sent upon connection.
Parameters:
  initremote - - if set to true, a DO is sent upon connection.
Parameters:
  acceptlocal - - if set to true, any DO request is accepted.
Parameters:
  acceptremote - - if set to true, any WILL request is accepted.





Method Detail
answerSubnegotiation
abstract public int[] answerSubnegotiation(int suboptionData, int suboptionLength)(Code)
Method called upon reception of a subnegotiation for this option coming from the other end. Must be implemented by the actual TelnetOptionHandler to specify which response must be sent for the subnegotiation request.


Parameters:
  suboptionData - - the sequence received, whithout IAC SB & IAC SE
Parameters:
  suboptionLength - - the length of data in suboption_data

response to be sent to the subnegotiation sequence. TelnetClientwill add IAC SB & IAC SE. null means no response




getAcceptLocal
public boolean getAcceptLocal()(Code)
Returns a boolean indicating whether to accept a DO request coming from the other end.

true if a DO request shall be accepted.




getAcceptRemote
public boolean getAcceptRemote()(Code)
Returns a boolean indicating whether to accept a WILL request coming from the other end.

true if a WILL request shall be accepted.




getDo
boolean getDo()(Code)
Returns a boolean indicating whether a DO request sent to the other side has been acknowledged.

true if a DO sent to the other side has been acknowledged.




getInitLocal
public boolean getInitLocal()(Code)
Returns a boolean indicating whether to send a WILL request to the other end upon connection.

true if a WILL request shall be sent upon connection.




getInitRemote
public boolean getInitRemote()(Code)
Returns a boolean indicating whether to send a DO request to the other end upon connection.

true if a DO request shall be sent upon connection.




getOptionCode
public int getOptionCode()(Code)
Returns the option code for this option.

Option code.




getWill
boolean getWill()(Code)
Returns a boolean indicating whether a WILL request sent to the other side has been acknowledged.

true if a WILL sent to the other side has been acknowledged.




setAcceptLocal
public void setAcceptLocal(boolean accept)(Code)
Set behaviour of the option for DO requests coming from the other end.


Parameters:
  accept - - if true, subsequent DO requests will be accepted.




setAcceptRemote
public void setAcceptRemote(boolean accept)(Code)
Set behaviour of the option for WILL requests coming from the other end.


Parameters:
  accept - - if true, subsequent WILL requests will be accepted.




setDo
void setDo(boolean state)(Code)
Tells this option whether a DO request sent to the other side has been acknowledged (invoked by TelnetClient).


Parameters:
  state - - if true, a DO request has been acknowledged.




setInitLocal
public void setInitLocal(boolean init)(Code)
Tells this option whether to send a WILL request upon connection.


Parameters:
  init - - if true, a WILL request will be sent upon subsequentconnections.




setInitRemote
public void setInitRemote(boolean init)(Code)
Tells this option whether to send a DO request upon connection.


Parameters:
  init - - if true, a DO request will be sent upon subsequentconnections.




setWill
void setWill(boolean state)(Code)
Tells this option whether a WILL request sent to the other side has been acknowledged (invoked by TelnetClient).


Parameters:
  state - - if true, a WILL request has been acknowledged.




startSubnegotiationLocal
abstract public int[] startSubnegotiationLocal()(Code)
This method is invoked whenever this option is acknowledged active on the local end (TelnetClient sent a WILL, remote side sent a DO). The method is used to specify a subnegotiation sequence that will be sent by TelnetClient when the option is activated.

subnegotiation sequence to be sent by TelnetClient. TelnetClientwill add IAC SB & IAC SE. null means no subnegotiation.




startSubnegotiationRemote
abstract public int[] startSubnegotiationRemote()(Code)
This method is invoked whenever this option is acknowledged active on the remote end (TelnetClient sent a DO, remote side sent a WILL). The method is used to specify a subnegotiation sequence that will be sent by TelnetClient when the option is activated.

subnegotiation sequence to be sent by TelnetClient. TelnetClientwill add IAC SB & IAC SE. null means no subnegotiation.




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.