BlowTorch
 All Classes Namespaces Files Functions Variables Enumerator Pages
Public Member Functions | List of all members
com.offsetnull.bt.service.OptionNegotiator Class Reference

Public Member Functions

 OptionNegotiator (final String ttype)
 
final byte[] processCommand (final byte first, final byte second, final byte third)
 
final byte[] getSubnegotiationResponse (final byte[] sequence)
 
final void setColumns (final int columns)
 
final int getColumns ()
 
final void setRows (final int rows)
 
final int getRows ()
 
final byte[] getNawsString ()
 
final void reset ()
 
final void setUseGMCP (final Boolean useGMCP)
 

Detailed Description

Helper class to the Processor. This object keeps track of the negotiation responses.

Constructor & Destructor Documentation

com.offsetnull.bt.service.OptionNegotiator.OptionNegotiator ( final String  ttype)

Constructor.

Parameters
ttypeThe package level configurable termtype option.

Member Function Documentation

final int com.offsetnull.bt.service.OptionNegotiator.getColumns ( )

Getter method for the NAWS Column data.

Returns
The number of columns.
final byte [] com.offsetnull.bt.service.OptionNegotiator.getNawsString ( )

Utility method to get the current NAWS String. Used for debugging telnet data.

Returns
The NAWS String that will be sent to the server (or already sent, not sure).

Here is the caller graph for this function:

final int com.offsetnull.bt.service.OptionNegotiator.getRows ( )

Getter method for NAWS rows.

Returns
Number of rows that NAWS is reporting.
final byte [] com.offsetnull.bt.service.OptionNegotiator.getSubnegotiationResponse ( final byte[]  sequence)

Processing routine for telnet subnegotiations.

Parameters
sequenceThe whole telnet subnegotiation sequence.
Returns
The response to sequence

Here is the caller graph for this function:

final byte [] com.offsetnull.bt.service.OptionNegotiator.processCommand ( final byte  first,
final byte  second,
final byte  third 
)

The top level telnet processing routine.

Parameters
firstI believe this will always be IAC
secondThe action byte, WILL, WONT, DO, DONT
thirdThe actual negotiation type, TTYPE, NAWS, GMCP, MCCP2, etc.
Returns
The response to the given telnet negotiation.

Here is the caller graph for this function:

final void com.offsetnull.bt.service.OptionNegotiator.reset ( )

Reset method, this is just to let the processing routines know that the TTYPE stack is reset to the beginning.

Here is the caller graph for this function:

final void com.offsetnull.bt.service.OptionNegotiator.setColumns ( final int  columns)

Method to set the number of columns for NAWS.

Parameters
columnsThe columns to use for NAWS.

Here is the caller graph for this function:

final void com.offsetnull.bt.service.OptionNegotiator.setRows ( final int  rows)

Method to set the number of rows for NAWS.

Parameters
rowsThe rows to report for NAWS.

Here is the caller graph for this function:

final void com.offsetnull.bt.service.OptionNegotiator.setUseGMCP ( final Boolean  useGMCP)

Setter method for mUseGMCP.

Parameters
useGMCPWeather or not to negotiate GMCP.

Here is the caller graph for this function:


The documentation for this class was generated from the following file: