public class NativeDaemonEvent extends Object
NativeDaemonConnector
.Modifier and Type | Field and Description |
---|---|
static String |
SENSITIVE_MARKER |
Modifier and Type | Method and Description |
---|---|
void |
checkCode(int code)
Verify this event matches the given code.
|
static String[] |
filterMessageList(NativeDaemonEvent[] events,
int matchCode)
Filter the given
NativeDaemonEvent list, returning
getMessage() for any events matching the requested code. |
int |
getCmdNumber() |
int |
getCode() |
String |
getField(int n)
Find the Nth field of the event.
|
FileDescriptor[] |
getFileDescriptors() |
String |
getMessage() |
String |
getRawEvent()
Deprecated.
|
boolean |
isClassClientError()
Test if event represents a command syntax or argument error.
|
boolean |
isClassContinue()
Test if event represents a partial response which is continued in
additional subsequent events.
|
boolean |
isClassOk()
Test if event represents a command success.
|
boolean |
isClassServerError()
Test if event represents a remote native daemon error.
|
boolean |
isClassUnsolicited()
Test if event represents an unsolicited event from native daemon.
|
static NativeDaemonEvent |
parseRawEvent(String rawEvent,
FileDescriptor[] fdList)
Parse the given raw event into
NativeDaemonEvent instance. |
String |
toString()
Returns a string representation of the object.
|
static String[] |
unescapeArgs(String rawEvent) |
public static final String SENSITIVE_MARKER
public int getCmdNumber()
public int getCode()
public String getMessage()
public FileDescriptor[] getFileDescriptors()
@Deprecated public String getRawEvent()
public String toString()
Object
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString
method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
public boolean isClassContinue()
public boolean isClassOk()
public boolean isClassServerError()
public boolean isClassClientError()
public boolean isClassUnsolicited()
public void checkCode(int code)
IllegalStateException
- if getCode()
doesn't match.public static NativeDaemonEvent parseRawEvent(String rawEvent, FileDescriptor[] fdList)
NativeDaemonEvent
instance.IllegalArgumentException
- when line doesn't match format expected
from native side.public static String[] filterMessageList(NativeDaemonEvent[] events, int matchCode)
NativeDaemonEvent
list, returning
getMessage()
for any events matching the requested code.public String getField(int n)