1 /* 2 * Licensed to the Apache Software Foundation (ASF) under one or more 3 * contributor license agreements. See the NOTICE file distributed with 4 * this work for additional information regarding copyright ownership. 5 * The ASF licenses this file to You under the Apache License, Version 2.0 6 * (the "License"); you may not use this file except in compliance with 7 * the License. You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17 18 package org.apache.commons.net.telnet; 19 20 /*** 21 * Implements the telnet suppress go ahead option RFC 858. 22 * <p> 23 * @author Bruno D'Avanzo 24 ***/ 25 public class SuppressGAOptionHandler extends TelnetOptionHandler 26 { 27 /*** 28 * Constructor for the SuppressGAOptionHandler. Allows defining desired 29 * initial setting for local/remote activation of this option and 30 * behaviour in case a local/remote activation request for this 31 * option is received. 32 * <p> 33 * @param initlocal - if set to true, a WILL is sent upon connection. 34 * @param initremote - if set to true, a DO is sent upon connection. 35 * @param acceptlocal - if set to true, any DO request is accepted. 36 * @param acceptremote - if set to true, any WILL request is accepted. 37 ***/ 38 public SuppressGAOptionHandler(boolean initlocal, boolean initremote, 39 boolean acceptlocal, boolean acceptremote) 40 { 41 super(TelnetOption.SUPPRESS_GO_AHEAD, initlocal, initremote, 42 acceptlocal, acceptremote); 43 } 44 45 /*** 46 * Constructor for the SuppressGAOptionHandler. Initial and accept 47 * behaviour flags are set to false 48 ***/ 49 public SuppressGAOptionHandler() 50 { 51 super(TelnetOption.SUPPRESS_GO_AHEAD, false, false, false, false); 52 } 53 54 /*** 55 * Implements the abstract method of TelnetOptionHandler. 56 * <p> 57 * @param suboptionData - the sequence received, whithout IAC SB & IAC SE 58 * @param suboptionLength - the length of data in suboption_data 59 * <p> 60 * @return always null (no response to subnegotiation) 61 ***/ 62 @Override 63 public int[] answerSubnegotiation(int suboptionData[], int suboptionLength) 64 { 65 return null; 66 } 67 68 /*** 69 * Implements the abstract method of TelnetOptionHandler. 70 * <p> 71 * @return always null (no response to subnegotiation) 72 ***/ 73 @Override 74 public int[] startSubnegotiationLocal() 75 { 76 return null; 77 } 78 79 /*** 80 * Implements the abstract method of TelnetOptionHandler. 81 * <p> 82 * @return always null (no response to subnegotiation) 83 ***/ 84 @Override 85 public int[] startSubnegotiationRemote() 86 { 87 return null; 88 } 89 }