1. /*
  2. * Copyright 2003-2004 The Apache Software Foundation
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  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. * Implements the telnet suppress go ahead option RFC 858.
  19. * <p>
  20. * @author Bruno D'Avanzo
  21. ***/
  22. public class SuppressGAOptionHandler extends TelnetOptionHandler
  23. {
  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, boolean initremote,
  36. boolean acceptlocal, boolean acceptremote)
  37. {
  38. super(TelnetOption.SUPPRESS_GO_AHEAD, initlocal, initremote,
  39. acceptlocal, acceptremote);
  40. }
  41. /***
  42. * Constructor for the SuppressGAOptionHandler. Initial and accept
  43. * behaviour flags are set to false
  44. ***/
  45. public SuppressGAOptionHandler()
  46. {
  47. super(TelnetOption.SUPPRESS_GO_AHEAD, false, false, false, false);
  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[], int suboptionLength)
  58. {
  59. return null;
  60. }
  61. /***
  62. * Implements the abstract method of TelnetOptionHandler.
  63. * <p>
  64. * @return always null (no response to subnegotiation)
  65. ***/
  66. public int[] startSubnegotiationLocal()
  67. {
  68. return null;
  69. }
  70. /***
  71. * Implements the abstract method of TelnetOptionHandler.
  72. * <p>
  73. * @return always null (no response to subnegotiation)
  74. ***/
  75. public int[] startSubnegotiationRemote()
  76. {
  77. return null;
  78. }
  79. }