org.glassfish.admin.payload
Class TextPayloadImpl

java.lang.Object
  extended by org.glassfish.admin.payload.TextPayloadImpl

public class TextPayloadImpl
extends java.lang.Object

Implements the Payload API for a message containing only a single text part.

This class is mainly useful so the RemoteCommand logic can treat the return payload from a command the same, regardless of whether it is actually a text-only payload (containing only the command report text itself) or a multi-part payload with different Parts.

This class is here primarily to make the plain text in a response look like the more general multi-part responses so the RemoteCommand class is free from dealing with the details of payload formatting - in particular, free from knowing how to tell if the payload contains just the text report or contains other parts as well.

Note that if an outbound payload contains only one Part then, currently, the Payload.Outbound.Impl.writeTo method copies the contents of that Part into the request or response stream rather than writing a multi-part payload that contains a single part. This is for compatibility with existing clients (such as NetBeans) which expect only the text report as the return payload.

Author:
tjquinn

Nested Class Summary
static class TextPayloadImpl.Inbound
           
 
Constructor Summary
TextPayloadImpl()
           
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextPayloadImpl

public TextPayloadImpl()


Copyright © 2012 GlassFish Community. All Rights Reserved.