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 StringMAGIC-
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 voidappendMessage(String s)Append the string to the internal buffer -- not to the internal message string!voidappendMessageln(String s)Append the string to the internal buffer and add a linefeed like 'println'voidgetCombinedMessages(ActionReporter aReport, StringBuilder out)Returns combined messages.StringgetContentType()Returns the content type to be used in sending the response back to the client/caller.StringgetMessage()voidsetMessage(String message)voidwriteReport(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:ActionReportOutputs the formatted information- Specified by:
writeReportin classActionReport- Parameters:
os- The OutputStream to which the information is sent to- Throws:
IOException
-
getContentType
public String getContentType()
Description copied from class:ActionReporterReturns 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:
getContentTypein 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:
appendMessagein 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:
setMessagein classActionReporter
-
getMessage
public final String getMessage()
- Overrides:
getMessagein classActionReporter
-
getCombinedMessages
public void getCombinedMessages(ActionReporter aReport, StringBuilder out)
Description copied from class:ActionReporterReturns 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:
getCombinedMessagesin classActionReporter- Parameters:
aReport- a given (usually top-level) ActionReporter instanceout- StringBuilder instance that contains all the messages
-
-