KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > activemq > console > formatter > OutputFormatter


1 /**
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one or more
4  * contributor license agreements. See the NOTICE file distributed with
5  * this work for additional information regarding copyright ownership.
6  * The ASF licenses this file to You under the Apache License, Version 2.0
7  * (the "License"); you may not use this file except in compliance with
8  * the License. You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */

18 package org.apache.activemq.console.formatter;
19
20 import javax.management.ObjectInstance JavaDoc;
21 import javax.management.ObjectName JavaDoc;
22 import javax.management.AttributeList JavaDoc;
23 import javax.jms.Message JavaDoc;
24 import java.util.Collection JavaDoc;
25 import java.util.Map JavaDoc;
26 import java.io.OutputStream JavaDoc;
27
28 public interface OutputFormatter {
29
30     /**
31      * Retrieve the output stream being used by the formatter
32      * @return
33      */

34     public OutputStream JavaDoc getOutputStream();
35
36     /**
37      * Print an ObjectInstance format of an mbean
38      * @param mbean - mbean to print
39      */

40     public void printMBean(ObjectInstance JavaDoc mbean);
41
42     /**
43      * Print an ObjectName format of an mbean
44      * @param mbean - mbean to print
45      */

46     public void printMBean(ObjectName JavaDoc mbean);
47
48     /**
49      * Print an AttributeList format of an mbean
50      * @param mbean - mbean to print
51      */

52     public void printMBean(AttributeList JavaDoc mbean);
53
54     /**
55      * Print a Map format of an mbean
56      * @param mbean - mbean to print
57      */

58     public void printMBean(Map JavaDoc mbean);
59
60     /**
61      * Print a Collection format of mbeans
62      * @param mbean - collection of mbeans
63      */

64     public void printMBean(Collection JavaDoc mbean);
65
66     /**
67      * Print a Map format of a JMS message
68      * @param msg
69      */

70     public void printMessage(Map JavaDoc msg);
71
72     /**
73      * Print a Message format of a JMS message
74      * @param msg - JMS message to print
75      */

76     public void printMessage(Message JavaDoc msg);
77
78     /**
79      * Print a Collection format of JMS messages
80      * @param msg - collection of JMS messages
81      */

82     public void printMessage(Collection JavaDoc msg);
83
84     /**
85      * Print help messages
86      * @param helpMsgs - help messages to print
87      */

88     public void printHelp(String JavaDoc[] helpMsgs);
89
90     /**
91      * Print an information message
92      * @param info - information message to print
93      */

94     public void printInfo(String JavaDoc info);
95
96     /**
97      * Print an exception message
98      * @param e - exception to print
99      */

100     public void printException(Exception JavaDoc e);
101
102     /**
103      * Print a version information
104      * @param version - version info to print
105      */

106     public void printVersion(String JavaDoc version);
107
108     /**
109      * Print a generic key value mapping
110      * @param map to print
111      */

112     public void print(Map JavaDoc map);
113
114     /**
115      * Print a generic array of strings
116      * @param strings - string array to print
117      */

118     public void print(String JavaDoc[] strings);
119
120     /**
121      * Print a collection of objects
122      * @param collection - collection to print
123      */

124     public void print(Collection JavaDoc collection);
125
126     /**
127      * Print a java string
128      * @param string - string to print
129      */

130     public void print(String JavaDoc string);
131 }
132
Popular Tags