git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1158333 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Timothy A. Bish 2011-08-16 15:51:48 +00:00
parent 7557f0cfa5
commit f1486c650d
5 changed files with 58 additions and 45 deletions

View File

@ -27,13 +27,12 @@ import org.apache.activemq.console.command.Command;
import org.apache.activemq.console.command.ShutdownCommand;
import org.apache.activemq.console.command.StartCommand;
import org.apache.activemq.console.CommandContext;
import org.apache.activemq.console.Main;
import org.apache.activemq.console.formatter.CommandShellOutputFormatter;
import org.apache.commons.daemon.Daemon;
import org.apache.commons.daemon.DaemonContext;
/**
* This class launches activemq under Apache JSVC {@link http://commons.apache.org/daemon/jsvc.html}
* This class launches ActiveMQ under <a href="http://commons.apache.org/daemon/jsvc.html">Apache JSVC</a>
*
* @author areese
*

View File

@ -33,7 +33,7 @@ public final class CommandContext {
/**
* Retrieve the output stream being used by the global formatter
*
* @return
* @return formatter's output stream
*/
public OutputStream getOutputStream() {
if (formatter == null) {
@ -83,6 +83,7 @@ public final class CommandContext {
*
* @param mbean
*/
@SuppressWarnings("rawtypes")
public void printMBean(Map mbean) {
if (formatter == null) {
throw new IllegalStateException("No OutputFormatter specified. Use GlobalWriter.instantiate(OutputFormatter).");
@ -95,6 +96,7 @@ public final class CommandContext {
*
* @param mbean - collection of mbeans
*/
@SuppressWarnings("rawtypes")
public void printMBean(Collection mbean) {
if (formatter == null) {
throw new IllegalStateException("No OutputFormatter specified. Use GlobalWriter.instantiate(OutputFormatter).");
@ -107,6 +109,7 @@ public final class CommandContext {
*
* @param msg
*/
@SuppressWarnings("rawtypes")
public void printMessage(Map msg) {
if (formatter == null) {
throw new IllegalStateException("No OutputFormatter specified. Use GlobalWriter.instantiate(OutputFormatter).");
@ -131,6 +134,7 @@ public final class CommandContext {
*
* @param msg - collection of JMS messages
*/
@SuppressWarnings("rawtypes")
public void printMessage(Collection msg) {
if (formatter == null) {
throw new IllegalStateException("No OutputFormatter specified. Use GlobalWriter.instantiate(OutputFormatter).");
@ -191,6 +195,7 @@ public final class CommandContext {
*
* @param map to print
*/
@SuppressWarnings("rawtypes")
public void print(Map map) {
if (formatter == null) {
throw new IllegalStateException("No OutputFormatter specified. Use GlobalWriter.instantiate(OutputFormatter).");
@ -215,6 +220,7 @@ public final class CommandContext {
*
* @param collection - collection to print
*/
@SuppressWarnings("rawtypes")
public void print(Collection collection) {
if (formatter == null) {
throw new IllegalStateException("No OutputFormatter specified. Use GlobalWriter.instantiate(OutputFormatter).");

View File

@ -48,7 +48,7 @@ public class AMQReader implements Iterable<Message> {
/**
* List all the data files in a directory
* @param directory
* @return
* @return result
* @throws IOException
*/
public static Set<File> listDataFiles(File directory) throws IOException{

View File

@ -45,6 +45,7 @@ public abstract class RegExQueryFilter extends AbstractQueryFilter {
* @return filtered objects that matches the regex query
* @throws Exception
*/
@SuppressWarnings({ "rawtypes", "unchecked" })
public List query(List queries) throws Exception {
Map regex = new HashMap();
List newQueries = new ArrayList();
@ -82,7 +83,7 @@ public abstract class RegExQueryFilter extends AbstractQueryFilter {
* RegExQueryFilter.REGEX_PREFIX.
*
* @param query
* @return
* @return boolean result of query check
*/
protected boolean isRegularExpression(String query) {
return query.startsWith(REGEX_PREFIX);
@ -106,6 +107,7 @@ public abstract class RegExQueryFilter extends AbstractQueryFilter {
* @return filtered list of objects that matches the regex map
* @throws Exception
*/
@SuppressWarnings({ "rawtypes", "unchecked" })
protected List filterCollectionUsingRegEx(Map regex, List data) throws Exception {
// No regular expressions filtering needed
if (regex == null || regex.isEmpty()) {
@ -134,5 +136,6 @@ public abstract class RegExQueryFilter extends AbstractQueryFilter {
* @return true, if the object matches the regex map, false otherwise
* @throws Exception
*/
@SuppressWarnings("rawtypes")
protected abstract boolean matches(Object data, Map regex) throws Exception;
}

View File

@ -29,7 +29,6 @@ public interface OutputFormatter {
/**
* Retrieve the output stream being used by the formatter
* @return
*/
OutputStream getOutputStream();
@ -55,18 +54,21 @@ public interface OutputFormatter {
* Print a Map format of an mbean
* @param mbean - mbean to print
*/
@SuppressWarnings("rawtypes")
void printMBean(Map mbean);
/**
* Print a Collection format of mbeans
* @param mbean - collection of mbeans
*/
@SuppressWarnings("rawtypes")
void printMBean(Collection mbean);
/**
* Print a Map format of a JMS message
* @param msg
*/
@SuppressWarnings("rawtypes")
void printMessage(Map msg);
/**
@ -79,6 +81,7 @@ public interface OutputFormatter {
* Print a Collection format of JMS messages
* @param msg - collection of JMS messages
*/
@SuppressWarnings("rawtypes")
void printMessage(Collection msg);
/**
@ -109,6 +112,7 @@ public interface OutputFormatter {
* Print a generic key value mapping
* @param map to print
*/
@SuppressWarnings("rawtypes")
void print(Map map);
/**
@ -121,6 +125,7 @@ public interface OutputFormatter {
* Print a collection of objects
* @param collection - collection to print
*/
@SuppressWarnings("rawtypes")
void print(Collection collection);
/**