KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > appserv > management > ext > logging > LogQueryEntry


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23
24 package com.sun.appserv.management.ext.logging;
25
26 import java.util.Map JavaDoc;
27 import java.util.Date JavaDoc;
28 import java.util.logging.Level JavaDoc;
29
30 /**
31     An individual result representing a log entry found
32     by {@link LogQuery#queryServerLog}.
33     
34     @since AS 9.0
35     @see LogQueryResult
36  */

37 public interface LogQueryEntry
38 {
39     /**
40         Get the fields associated with this entry.
41         The fields are indexed by the values found in
42         {@link LogRecordFields}. A field is always non-null.
43      */

44     public Object JavaDoc[] getFields();
45     
46     /**
47         The record number within the log file (first one is 0).
48      */

49     public long getRecordNumber();
50     
51     /**
52         The name of the product.
53      */

54     public String JavaDoc getProductName();
55     
56      
57     /**
58         The Date that the log entry was emitted.
59      */

60     public Date JavaDoc getDate();
61     
62     /**
63         The module or Logger that emitted the entry.
64      */

65     public String JavaDoc getModule();
66     
67     /**
68         The Level of the entry.
69      */

70     public String JavaDoc getLevel();
71     
72     /**
73         The unique message ID identifying the entry.
74      */

75     public String JavaDoc getMessageID();
76     
77     /**
78         The free-form message.
79      */

80     public String JavaDoc getMessage();
81     
82     
83     /**
84         Key for the thread ID within the Map returned by {@link #getNameValuePairsMap}.
85         Value is of type java.lang.String.
86      */

87     public static final String JavaDoc THREAD_ID_KEY = "_ThreadID";
88     
89     /**
90         Key for the ObjectName within the Map returned by {@link #getNameValuePairsMap}.
91         Value is of type javax.management.ObjectName.
92      */

93     public static final String JavaDoc OBJECT_NAME_KEY = "_ObjectName";
94     
95     /**
96         A Map containing name/value pairs as parsed
97         from the String given by {@link #getNameValuePairs}.
98         Values which are available for public use are:
99         <ul>
100         <li>{@link #THREAD_ID_KEY}</li>
101         <li>{@link #OBJECT_NAME_KEY}</li>
102         </ul>
103      */

104     public Map JavaDoc<String JavaDoc,String JavaDoc> getNameValuePairsMap();
105     
106     /**
107         The raw name/value pair String for this log entry. Each
108         pair is separated by the ';' character.
109      */

110     public String JavaDoc getNameValuePairs();
111     
112     /**
113         The ID of the thread that emitted the entry (may be null).
114      */

115     public String JavaDoc getThreadID();
116 }
117
118
119
120
121
122
123
Popular Tags