Package com.sun.enterprise.admin.report
Class PlainTextActionReporter
- java.lang.Object
-
- org.glassfish.api.ActionReport
-
- com.sun.enterprise.admin.report.ActionReporter
-
- com.sun.enterprise.admin.report.PlainTextActionReporter
-
- All Implemented Interfaces:
Serializable
@Service(name="plain") @PerLookup public class PlainTextActionReporter extends ActionReporter
- Author:
- Byron Nevins
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.glassfish.api.ActionReport
ActionReport.ExitCode, ActionReport.MessagePart
-
-
Field Summary
Fields Modifier and Type Field Description static String
MAGIC
-
Fields inherited from class com.sun.enterprise.admin.report.ActionReporter
actionDescription, contentType, EOL_MARKER, exception, exitCode, subActions, topMessage
-
-
Constructor Summary
Constructors Constructor Description PlainTextActionReporter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
appendMessage(String s)
Append the string to the internal buffer -- not to the internal message string!void
appendMessageln(String s)
Append the string to the internal buffer and add a linefeed like 'println'void
getCombinedMessages(ActionReporter aReport, StringBuilder out)
Returns combined messages.String
getContentType()
Returns the content type to be used in sending the response back to the client/caller.String
getMessage()
void
setMessage(String message)
void
writeReport(OutputStream os)
Outputs the formatted information-
Methods inherited from class com.sun.enterprise.admin.report.ActionReporter
addSubActionsReport, getActionDescription, getActionExitCode, getFailureCause, getSubActionsReport, getTopMessagePart, hasFailures, hasSuccesses, hasWarnings, isFailure, isSuccess, isWarning, setActionDescription, setActionExitCode, setContentType, setFailure, setFailureCause, setMessage, setSuccess, setWarning
-
Methods inherited from class org.glassfish.api.ActionReport
failure, failure, findProperty, getExtraProperties, getResultType, setExtraProperties, setResultType, toString
-
-
-
-
Field Detail
-
MAGIC
public static final String MAGIC
- See Also:
- Constant Field Values
-
-
Method Detail
-
writeReport
public void writeReport(OutputStream os) throws IOException
Description copied from class:ActionReport
Outputs the formatted information- Specified by:
writeReport
in classActionReport
- Parameters:
os
- The OutputStream to which the information is sent to- Throws:
IOException
-
getContentType
public String getContentType()
Description copied from class:ActionReporter
Returns the content type to be used in sending the response back to the client/caller.This is the default type. Specific subclasses of ActionReporter might override the method to return a different valid type.
- Overrides:
getContentType
in classActionReporter
- Returns:
- content type to be used in formatting the command response to the client
-
appendMessage
public final void appendMessage(String s)
Append the string to the internal buffer -- not to the internal message string!- Overrides:
appendMessage
in classActionReporter
- Parameters:
s
- the string to append
-
appendMessageln
public final void appendMessageln(String s)
Append the string to the internal buffer and add a linefeed like 'println'- Parameters:
s
- the string to append
-
setMessage
public void setMessage(String message)
- Overrides:
setMessage
in classActionReporter
-
getMessage
public final String getMessage()
- Overrides:
getMessage
in classActionReporter
-
getCombinedMessages
public void getCombinedMessages(ActionReporter aReport, StringBuilder out)
Description copied from class:ActionReporter
Returns combined messages. Meant mainly for long running operations where some of the intermediate steps can go wrong, although overall operation succeeds. Does nothing if either of the arguments are null. The traversal visits the message of current reporter first. The various parts of the message are separated by EOL_MARKERs.Note: This method is a recursive implementation.
- Overrides:
getCombinedMessages
in classActionReporter
- Parameters:
aReport
- a given (usually top-level) ActionReporter instanceout
- StringBuilder instance that contains all the messages
-
-