1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.commons.net.telnet;
17
18 /***
19 * Implements the telnet echo option RFC 857.
20 * <p>
21 * @author Bruno D'Avanzo
22 ***/
23 public class EchoOptionHandler extends TelnetOptionHandler
24 {
25 /***
26 * Constructor for the EchoOptionHandler. Allows defining desired
27 * initial setting for local/remote activation of this option and
28 * behaviour in case a local/remote activation request for this
29 * option is received.
30 * <p>
31 * @param initlocal - if set to true, a WILL is sent upon connection.
32 * @param initremote - if set to true, a DO is sent upon connection.
33 * @param acceptlocal - if set to true, any DO request is accepted.
34 * @param acceptremote - if set to true, any WILL request is accepted.
35 ***/
36 public EchoOptionHandler(boolean initlocal, boolean initremote,
37 boolean acceptlocal, boolean acceptremote)
38 {
39 super(TelnetOption.ECHO, initlocal, initremote,
40 acceptlocal, acceptremote);
41 }
42
43 /***
44 * Constructor for the EchoOptionHandler. Initial and accept
45 * behaviour flags are set to false
46 ***/
47 public EchoOptionHandler()
48 {
49 super(TelnetOption.ECHO, false, false, false, false);
50 }
51
52 /***
53 * Implements the abstract method of TelnetOptionHandler.
54 * <p>
55 * @param suboptionData - the sequence received, whithout IAC SB & IAC SE
56 * @param suboptionLength - the length of data in suboption_data
57 * <p>
58 * @return always null (no response to subnegotiation)
59 ***/
60 public int[] answerSubnegotiation(int suboptionData[],
61 int suboptionLength)
62 {
63 return null;
64 }
65
66 /***
67 * Implements the abstract method of TelnetOptionHandler.
68 * <p>
69 * @return always null (no response to subnegotiation)
70 ***/
71 public int[] startSubnegotiationLocal()
72 {
73 return null;
74 }
75
76 /***
77 * Implements the abstract method of TelnetOptionHandler.
78 * <p>
79 * @return always null (no response to subnegotiation)
80 ***/
81 public int[] startSubnegotiationRemote()
82 {
83 return null;
84 }
85 }