|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.EventObject
stella.net.tpl.TplEvent
public class TplEvent
A reply from the server. Can be issued at any time, thus parsed from a pending input on the socket line. The term is missleading as this is more the general reply from the server rather then the more specific case of a Tpl2Event.
The replies fall into the following categories, discerned by the
string token following the ID. This token is the type and it defines also
the meaning of the third token, here called state. Additionally to these,
some quenched replies due to atuhentication or disconnect request exist.
These replies have no leading ID, but rather immediately start with either
CONNECT or DISCONNECT. Both are not further explained
here.
The main reply object types then fall into these categories:
1234564 COMMAND ERROR SYNTAX1234566 COMMAND ABORTEDBY 123456526920 DATA INLINE TELESCOPE.READY_STATE=0.026921 AUXILIARY.SENSOR[0].DESCRIPTION="Cabinet"26922 DATA INLINE TELESCOPE.READY=FAILED
26920 EVENT WARN AXIS[1]:142 "Speedwarn:23"
| Field Summary | |
|---|---|
static String |
COMMAND
Events following a command. |
static String |
CONNECT
Connect event, will always get ID=0. |
static String |
DATA
Events as reseults to data requests/settings. |
static String |
DEBUG
Event debug error level. |
static String |
DISCONNECT
Disconnect event, will always get ID=0. |
static String |
ERROR
Event severe error level. |
static String |
EVENT
General events not bound to commands or data. |
private int |
id
The command id this event referes to. |
private String |
info
The string after the id, type and the event state. |
static String |
INFO
Event info error level. |
private Object |
state
The state of the event object. |
private Object |
type
The event type, one of COMMAND, DATA, EVENT, CONNECT or DISCONNECT. |
static String |
WARN
Event warn error level. |
| Fields inherited from class java.util.EventObject |
|---|
source |
| Constructor Summary | |
|---|---|
TplEvent(Object source,
String line)
Constructs a new tpl event from the line read. |
|
| Method Summary | |
|---|---|
int |
getID()
Returns the unique integer id-this event follows. |
String |
getInfo()
Returns any additional info attached to this event as a space-separated string. |
Object |
getState()
Returns the state of the event. |
boolean |
isCommand()
Returns true if this tpl-event is a command type. |
boolean |
isConnect()
Returns true if this tpl-event is of a general type. |
boolean |
isData()
Returns true if this tpl-event is of data type. |
boolean |
isDisconnect()
Returns true if this tpl-event is of a general type. |
boolean |
isEvent()
Returns true if this tpl-event is of a general type. |
private void |
parseLine(String read)
Parses the event out of the reply line read. |
String |
toString()
Return the string representation. |
| Methods inherited from class java.util.EventObject |
|---|
getSource |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String CONNECT
public static final String DISCONNECT
public static final String COMMAND
public static final String DATA
public static final String EVENT
public static final String DEBUG
public static final String INFO
public static final String WARN
public static final String ERROR
private int id
private Object type
private Object state
private String info
| Constructor Detail |
|---|
public TplEvent(Object source,
String line)
| Method Detail |
|---|
public int getID()
public boolean isCommand()
public boolean isData()
public boolean isEvent()
public boolean isDisconnect()
public boolean isConnect()
public Object getState()
public String getInfo()
private void parseLine(String read)
public String toString()
toString in class EventObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||