|
Secure iNet Factory | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jscape.inet.terminal.ControlSequence
public class ControlSequence
Represents control sequence. There are several types of control sequence
depending of the second character in sequence. These types are implemented
as "Strategy" pattern [Gamma94]. Control sequence may be in three states:
closed (if there is no sequence opening character),
in-progress (if sequence opening character is received)
and complete (when ending character is received).
Each control sequence has "canonical" form which is used to map
incoming control sequence to ControlCommand
objects.
Field Summary | |
---|---|
static char |
DEFAULT_OPENING_CHAR
|
Constructor Summary | |
---|---|
ControlSequence()
Creates ControlSequence object with default opening char
('\033'). |
|
ControlSequence(char openingCh)
Creates ControlSequence object giving opening char. |
Method Summary | |
---|---|
static boolean |
addType(char keyValue,
SequenceType type)
Adds map of second sequence character to SequenceType object. |
void |
append(char ch)
Adds char to current sequence. |
java.lang.String |
getCanonicalForm()
Returns "canonical" form of control sequence (i.e. |
char |
getOpeningChar()
Returns sequence opening char. |
int[] |
getParameters()
Extracts and returns sequence parameters as array of int . |
boolean |
inProgress()
Checks if sequence is in progress. |
boolean |
isComplete()
Checks if sequence is complete. |
boolean |
isOpeningChar(char ch)
Checks if giving char is opening char for current sequence. |
static boolean |
removeType(char keyValue)
Removes map. |
void |
reset()
Resets current sequence. |
void |
startNew()
Resets sequence and starts a new one. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final char DEFAULT_OPENING_CHAR
Constructor Detail |
---|
public ControlSequence(char openingCh)
ControlSequence
object giving opening char.
openingCh
- sequence opening char.public ControlSequence()
ControlSequence
object with default opening char
('\033').
Method Detail |
---|
public static boolean addType(char keyValue, SequenceType type)
SequenceType
object.
keyValue
- second character in sequence.type
- SequenceType
object.
public static boolean removeType(char keyValue)
keyValue
- second character in sequence.
public java.lang.String getCanonicalForm()
public java.lang.String toString()
toString
in class java.lang.Object
public char getOpeningChar()
public boolean isComplete()
public boolean inProgress()
public boolean isOpeningChar(char ch)
ch
- char to check.
public int[] getParameters()
int
.
int
.public void append(char ch)
ch
- character to add.public void reset()
public void startNew()
|
Secure iNet Factory | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |