com.sun.enterprise.v3.common
Class PlainTextActionReporter

java.lang.Object
  extended by org.glassfish.api.ActionReport
      extended by com.sun.enterprise.v3.common.ActionReporter
          extended by com.sun.enterprise.v3.common.PlainTextActionReporter

@Service(name="plain")
@Scoped(value=org.jvnet.hk2.component.PerLookup.class)
public class PlainTextActionReporter
extends ActionReporter

Author:
Byron Nevins

Nested Class Summary
 
Nested classes/interfaces inherited from class org.glassfish.api.ActionReport
ActionReport.ExitCode, ActionReport.MessagePart
 
Field Summary
static String MAGIC
           
 
Fields inherited from class com.sun.enterprise.v3.common.ActionReporter
actionDescription, contentType, EOL_MARKER, exception, exitCode, subActions, topMessage
 
Constructor Summary
PlainTextActionReporter()
           
 
Method Summary
 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'
protected  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)
           
 
Methods inherited from class com.sun.enterprise.v3.common.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, getExtraProperties, getResultType, setExtraProperties, setResultType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAGIC

public static final String MAGIC
See Also:
Constant Field Values
Constructor Detail

PlainTextActionReporter

public PlainTextActionReporter()
Method Detail

writeReport

public void writeReport(OutputStream os)
                 throws IOException
Specified by:
writeReport in class ActionReport
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 class ActionReporter
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 class ActionReporter
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 class ActionReporter

getMessage

public final String getMessage()
Overrides:
getMessage in class ActionReporter

getCombinedMessages

protected 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 class ActionReporter
Parameters:
aReport - a given (usually top-level) ActionReporter instance
out - StringBuilder instance that contains all the messages


Copyright © 2012. All Rights Reserved.