/** * Handle option parameters call back. The implementation will try to find a matching option * via the {@code Option#values()} and invoke it's {@link Option#handleParameters(TelnetConnection, byte[])} method. * * This method can be subclassed to handle an option. * * @param optionCode the option code */ protected void onOptionParameters(byte optionCode, byte[] parameters) { for (Option option : Option.values()) { if (option.code == optionCode) { option.handleParameters(this, parameters); return; } } }
/** * Handle option parameters call back. The implementation will try to find a matching option * via the {@code Option#values()} and invoke it's {@link Option#handleParameters(TelnetConnection, byte[])} method. * * This method can be subclassed to handle an option. * * @param optionCode the option code */ protected void onOptionParameters(byte optionCode, byte[] parameters) { for (Option option : Option.values()) { if (option.code == optionCode) { option.handleParameters(this, parameters); return; } } }