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 suppress go ahead option RFC 858.
20: * <p>
21: * @author Bruno D'Avanzo
22: ***/
23: public class SuppressGAOptionHandler extends TelnetOptionHandler {
24: /***
25: * Constructor for the SuppressGAOptionHandler. 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 SuppressGAOptionHandler(boolean initlocal,
36: boolean initremote, boolean acceptlocal,
37: boolean acceptremote) {
38: super (TelnetOption.SUPPRESS_GO_AHEAD, initlocal, initremote,
39: acceptlocal, acceptremote);
40: }
41:
42: /***
43: * Constructor for the SuppressGAOptionHandler. Initial and accept
44: * behaviour flags are set to false
45: ***/
46: public SuppressGAOptionHandler() {
47: super (TelnetOption.SUPPRESS_GO_AHEAD, false, false, false,
48: false);
49: }
50:
51: /***
52: * Implements the abstract method of TelnetOptionHandler.
53: * <p>
54: * @param suboptionData - the sequence received, whithout IAC SB & IAC SE
55: * @param suboptionLength - the length of data in suboption_data
56: * <p>
57: * @return always null (no response to subnegotiation)
58: ***/
59: public int[] answerSubnegotiation(int suboptionData[],
60: int suboptionLength) {
61: return null;
62: }
63:
64: /***
65: * Implements the abstract method of TelnetOptionHandler.
66: * <p>
67: * @return always null (no response to subnegotiation)
68: ***/
69: public int[] startSubnegotiationLocal() {
70: return null;
71: }
72:
73: /***
74: * Implements the abstract method of TelnetOptionHandler.
75: * <p>
76: * @return always null (no response to subnegotiation)
77: ***/
78: public int[] startSubnegotiationRemote() {
79: return null;
80: }
81: }
|