SyslogMessage.java
1.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
package com.sitech.ismp.ice.syslogd;
public class
SyslogMessage
implements Cloneable
{
public static final String RCS_ID = "$Id: SyslogMessage.java,v 1.1.1.1 1998/02/22 05:47:54 time Exp $";
public static final String RCS_REV = "$Revision: 1.1.1.1 $";
public static final String RCS_NAME = "$Name: $";
public boolean isRepeat;
public int facility;
public int priority;
public String timestamp;
public String hostName;
public String processName;
public int processId;
public String message;
public String[] matchVars;
private
SyslogMessage()
{
super();
this.isRepeat = false;
this.facility = 0;
this.priority = 0;
this.timestamp = null;
this.hostName = null;
this.processName = null;
this.processId = 0;
this.message = null;
this.matchVars = null;
}
public
SyslogMessage(
int facility, int priority,
String timestamp, String hostName,
String processName, int processId, String message )
{
super();
this.isRepeat = false;
this.facility = facility;
this.priority = priority;
this.timestamp = timestamp;
this.hostName = hostName;
this.processName = processName;
this.processId = processId;
this.message = message;
this.matchVars = null;
}
public Object
clone()
{
SyslogMessage cObj = null;
try { cObj = (SyslogMessage) super.clone(); }
catch ( CloneNotSupportedException ex )
{ cObj = new SyslogMessage(); }
cObj.message = new String( this.message );
cObj.hostName = new String( this.hostName );
cObj.timestamp = new String( this.timestamp );
cObj.processName = new String( this.processName );
if ( this.matchVars != null )
{
cObj.matchVars =
new String[ this.matchVars.length ];
for ( int i = 0 ; i < this.matchVars.length ; ++i )
cObj.matchVars[i] =
new String( this.matchVars[i] );
}
return cObj;
}
}