|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Payload
Interface for admin command payloads--data carried in the http request and response which flow between the admin client and the server. This API also allows the requester to ask that the receiver remove a file, presumably one that was transferred via an earlier request payload.
Payload.Outbound. (The
org.glassfish.admin.payload.PayloadImpl.Outbound class is such an implementation.)
To this Payload.Outbound object the code can add parts using any of the Payload.Outbound.addPart(java.lang.String, java.lang.String, java.util.Properties, java.lang.String)
methods or the Payload.Outbound.attachFile(java.lang.String, java.net.URI, java.lang.String, java.io.File) or Payload.Outbound.requestFileRemoval(java.net.URI, java.lang.String, java.util.Properties) convenience methods.
After the code has added all
the relevant parts to the payload it invokes the Payload.Outbound.writeTo(java.io.OutputStream) method to write
the outbound payload to an OutputStream. Typically the caller will pass the
output stream associated with the request (in the client case) or the response (in the
server case).
Payload.Inbound. (The org.glassfish.admin.payload.PayloadImpl.Inbound
is such an implementation.
Payload.Inbound exposes the Payload.Inbound.parts() method
which returns an Iterator<Part>. With each Payload.Part available through the
iterator the caller can use Payload.Part.getContentType(),
Payload.Part.getName(), and Payload.Part.getInputStream().
Note that the caller should close the InputStream returned by getInputStream()
once it has read the data from the stream.
The receiver of the file transfer request should return the file-xfer-root value back to the requester without change so the local file path syntax can be used correctly on the system where the file will exist.
| Nested Class Summary | |
|---|---|
static interface |
Payload.Inbound
Public API for inbound payloads. |
static interface |
Payload.Outbound
Public API for outbound Payloads. |
static interface |
Payload.Part
Public API for the payload Part. |
| Field Summary | |
|---|---|
static java.lang.String |
PAYLOAD_HEADER_NAME
|
| Field Detail |
|---|
static final java.lang.String PAYLOAD_HEADER_NAME
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||