public class LexiComLogEvent
extends java.lang.Object
LexiComLogListener.log(LexiComLogEvent).
Events include:
Tag: Thread Content: No Attributes: level (required)
type (optional)
Tag: Command Content: No Attributes: text, type (required)
line (optional)
Tag: Detail Content: Yes Attributes: level (required)
type (optional)
Tag: Hint Content: Yes Attributes: -
Tag: Request Content: No Attributes: text, type (required)
Tag: Incoming Content: No Attributes: transferID, messageID, source, folder,
host, mailbox, transport (optional)
Tag: File Content: No Attributes: transferID, messageID, source, direction,
destination, number, fileSize,
fileTimeStamp, host, mailbox (optional)
Tag: Transfer Content: No Attributes: bytes, seconds (required)
active, percentage, mode, blocks,
errors (optional)
Tag: Response Content: Yes Attributes: host (required)
Tag: Result Content: Yes Attributes: text (required),
command, line (from Command)
transferID, messageID, source, direction,
destination, number, fileSize,
fileTimeStamp (from File),
bytes, seconds (from Transfer)
origMessageID, mdn, asyncMDN
Tag: End Content: No Attributes: -
Sequential events can be tied together by using the event's threadID/commandID.
Following is a general flow of events for files sent/received via a VersaLex action:
Thread
Command -----------------------+ Repeated
File -------+ Repeated | for each
Request | for each | command
Transfer | file sent/ | in the
Response | received | action
Result -----+----------------+
End
Detail and Hint events can occur at anytime. The exact order of events between
File and Result is protocol dependent. Depending on the protocol, there may in fact
be multiple Request and Response events for one File.
Following is a general flow of events for unsolicited files sent/received via the
VersaLex Local Listener:
Connect (if FTP)
Request -----------------------+ Repeated
Incoming (if AS2/AS3) | for each
File | file
Transfer | sent/received
Response | during the FTP
Result ------------------------+ connection
Disconnect (if FTP)
Detail and Hint events can occur at anytime. The exact order of events between
Incoming and Result is protocol dependent. Depending on the protocol, there may
in fact be multiple Request and Response events for one File.
| Constructor and Description |
|---|
LexiComLogEvent(java.lang.String[] source,
org.w3c.dom.Element event,
java.lang.String message,
java.util.Date date,
java.lang.String threadID,
java.lang.String commandID)
Constructs a LexiComLogEvent with the specified host, mailbox, action and the specified event
|
| Modifier and Type | Method and Description |
|---|---|
static LexiComLogEvent |
fromBytes(byte[] bytes)
Converts a byte array into a LexiComLogEvent Object
|
java.lang.String |
getBy()
Returns who logged the event.
|
java.lang.String |
getColor()
Returns the log event color.
|
java.lang.String |
getCommandID()
Returns the log event command ID.
|
java.util.Date |
getDate()
Returns the log event time/date.
|
org.w3c.dom.Element |
getEvent()
Returns the log event.
|
java.lang.String |
getMessage()
Returns the log event.
|
java.lang.String[] |
getSource()
Returns the alias path for the log event.
|
java.lang.String |
getText()
Returns the log event text.
|
java.lang.String |
getThreadID()
Returns the log event thread ID.
|
java.lang.String |
getWhen()
Returns when the log event occurred.
|
boolean |
isInLogFile()
Indicates whether log event is being logged to system log file.
|
boolean |
isInMessageList()
Indicates whether log event is being shown in system messages list pane.
|
static java.lang.String |
readString(byte[] bytes,
int offset)
Helper method to convert a byte array back into a Java String
|
byte[] |
toBytes()
Converts the event into a byte array
|
static void |
writeString(java.io.DataOutputStream dos,
java.lang.String str)
Helper method to convert a string to bytes
|
public LexiComLogEvent(java.lang.String[] source,
org.w3c.dom.Element event,
java.lang.String message,
java.util.Date date,
java.lang.String threadID,
java.lang.String commandID)
source - the source alias pathevent - the log event as a DOM elementmessage - the log event as a text stringdate - the time/date the event was loggedthreadID - the thread ID of the log eventcommandID - the command ID of the log eventpublic byte[] toBytes()
throws java.io.IOException
java.io.IOExceptionpublic static LexiComLogEvent fromBytes(byte[] bytes)
bytes - public java.lang.String[] getSource()
public org.w3c.dom.Element getEvent()
public java.lang.String getMessage()
public java.lang.String getWhen()
public java.lang.String getBy()
public java.lang.String getText()
public java.lang.String getColor()
public java.util.Date getDate()
public java.lang.String getThreadID()
public java.lang.String getCommandID()
public boolean isInLogFile()
public boolean isInMessageList()
public static void writeString(java.io.DataOutputStream dos,
java.lang.String str)
throws java.io.IOException
dos - - the DataOutputStream object to write the bytes tostr - - The string to convertjava.io.IOExceptionpublic static java.lang.String readString(byte[] bytes,
int offset)
bytes - - the bytes to convert to stringoffset - - Offset to start reading the string