TerminalTypeOptionHandlerpublic class TerminalTypeOptionHandler extends TelnetOptionHandler Implements the telnet terminal type option RFC 1091.
|
Fields Summary |
---|
private String | termTypeTerminal type | protected static final int | TERMINAL_TYPETerminal type option | protected static final int | TERMINAL_TYPE_SENDSend (for subnegotiation) | protected static final int | TERMINAL_TYPE_ISIs (for subnegotiation) |
Constructors Summary |
---|
public TerminalTypeOptionHandler(String termtype, boolean initlocal, boolean initremote, boolean acceptlocal, boolean acceptremote)Constructor for the TerminalTypeOptionHandler. Allows defining desired
initial setting for local/remote activation of this option and
behaviour in case a local/remote activation request for this
option is received.
super(TelnetOption.TERMINAL_TYPE, initlocal, initremote,
acceptlocal, acceptremote);
termType = termtype;
| public TerminalTypeOptionHandler(String termtype)Constructor for the TerminalTypeOptionHandler. Initial and accept
behaviour flags are set to false
super(TelnetOption.TERMINAL_TYPE, false, false, false, false);
termType = termtype;
|
Methods Summary |
---|
public int[] | answerSubnegotiation(int[] suboptionData, int suboptionLength)Implements the abstract method of TelnetOptionHandler.
if ((suboptionData != null) && (suboptionLength > 1)
&& (termType != null))
{
if ((suboptionData[0] == TERMINAL_TYPE)
&& (suboptionData[1] == TERMINAL_TYPE_SEND))
{
int response[] = new int[termType.length() + 2];
response[0] = TERMINAL_TYPE;
response[1] = TERMINAL_TYPE_IS;
for (int ii = 0; ii < termType.length(); ii++)
{
response[ii + 2] = (int) termType.charAt(ii);
}
return response;
}
}
return null;
| public int[] | startSubnegotiationLocal()Implements the abstract method of TelnetOptionHandler.
return null;
| public int[] | startSubnegotiationRemote()Implements the abstract method of TelnetOptionHandler.
return null;
|
|