01: /*
02: * Copyright 2003-2004 The Apache Software Foundation
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
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: * Constructor for the EchoOptionHandler. Allows defining desired
26: * initial setting for local/remote activation of this option and
27: * behaviour in case a local/remote activation request for this
28: * option is received.
29: * <p>
30: * @param initlocal - if set to true, a WILL is sent upon connection.
31: * @param initremote - if set to true, a DO is sent upon connection.
32: * @param acceptlocal - if set to true, any DO request is accepted.
33: * @param acceptremote - if set to true, any WILL request is accepted.
34: ***/
35: public EchoOptionHandler(boolean initlocal, boolean initremote,
36: boolean acceptlocal, boolean acceptremote) {
37: super (TelnetOption.ECHO, initlocal, initremote, acceptlocal,
38: acceptremote);
39: }
40:
41: /***
42: * Constructor for the EchoOptionHandler. Initial and accept
43: * behaviour flags are set to false
44: ***/
45: public EchoOptionHandler() {
46: super (TelnetOption.ECHO, false, false, false, false);
47: }
48:
49: /***
50: * Implements the abstract method of TelnetOptionHandler.
51: * <p>
52: * @param suboptionData - the sequence received, whithout IAC SB & IAC SE
53: * @param suboptionLength - the length of data in suboption_data
54: * <p>
55: * @return always null (no response to subnegotiation)
56: ***/
57: public int[] answerSubnegotiation(int suboptionData[],
58: int suboptionLength) {
59: return null;
60: }
61:
62: /***
63: * Implements the abstract method of TelnetOptionHandler.
64: * <p>
65: * @return always null (no response to subnegotiation)
66: ***/
67: public int[] startSubnegotiationLocal() {
68: return null;
69: }
70:
71: /***
72: * Implements the abstract method of TelnetOptionHandler.
73: * <p>
74: * @return always null (no response to subnegotiation)
75: ***/
76: public int[] startSubnegotiationRemote() {
77: return null;
78: }
79: }
|