Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package examples.nistgoodies.configlogger;
 
 
 public class LogRecordImpl implements LogRecord {
 
     private String message;
     private String source;
     private String destination;
    private long timeStamp;
    private String tid;
    private String firstLine;
    private String callId;
    private long timestampVal;

    
Constructor for our custom log record

Parameters:
message -- the message to log
source -- the source
destination -- the destination
timeStamp -- the reception time
isSender -- the flag indicates whether we are sending or recieving the record
firstLine -- the messge first line
tid -- the transaction id
callId -- the callId
timestampVal -- the timestamp Header value.
    public LogRecordImpl(String messageString sourceString destination,
            long timeStampboolean isSenderString firstLineString tid,
            String callIdlong timestampVal) {
        this. = message;
        this. = source;
        this. = destination;
        this. = timeStamp;
        this. = firstLine;
        this. = tid;
        this. = callId;
        this. = timestampVal;
    }
    public boolean equals(Object other) {
        if (!(other instanceof LogRecordImpl)) {
            return false;
        } else {
            LogRecordImpl otherLog = (LogRecordImplother;
            return otherLog.message.equals()
                && otherLog.timeStamp == ;
        }
    }
    public String toString() {
        StringBuilder sbuf = new StringBuilder();
        sbuf.append("------------  Message BEGIN ----------- \n");
        sbuf.append("timeStamp = " + this. + "\n");
        sbuf.append(this.);
        return sbuf.toString();
    }
New to GrepCode? Check out our FAQ X