|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public static interface Payload.Outbound
Public API for outbound Payloads.
| Method Summary | |
|---|---|
void |
addPart(int index,
java.lang.String contentType,
java.lang.String name,
java.util.Properties props,
java.io.InputStream content)
Adds a part of the specified content type, name, and content at a specified position in the parts of the payload. |
void |
addPart(java.lang.String contentType,
java.lang.String name,
java.util.Properties props,
java.io.InputStream content)
Adds a part of the specified content type, name, and content to the payload. |
void |
addPart(java.lang.String contentType,
java.lang.String name,
java.util.Properties props,
java.lang.String content)
Adds a part of the specified content type, name, and String content to the payload. |
void |
attachFile(java.lang.String contentType,
java.net.URI fileURI,
java.lang.String dataRequestName,
java.io.File file)
Adds a part to the payload of the given content type from the specified file. |
void |
attachFile(java.lang.String contentType,
java.net.URI fileURI,
java.lang.String dataRequestName,
java.io.File file,
boolean isRecursive)
Adds a part to the payload of the given content type from the specified file. |
void |
attachFile(java.lang.String contentType,
java.net.URI fileURI,
java.lang.String dataRequestName,
java.util.Properties props,
java.io.File file)
Adds a part to the payload of the given content type from the specified file. |
void |
attachFile(java.lang.String contentType,
java.net.URI fileURI,
java.lang.String dataRequestName,
java.util.Properties props,
java.io.File file,
boolean isRecursive)
Adds a part to the payload of the given content type from the specified file. |
java.lang.String |
getContentType()
Returns the content type of the payload, determined by whether there are multiple parts and, if not, if the content type of the single part is of type "text." |
java.lang.String |
getHeaderName()
Returns the name of the header that should be set in the outgoing and incoming http request or response. |
void |
requestFileRemoval(java.net.URI fileURI,
java.lang.String dataRequestName,
java.util.Properties props)
Adds a part to the payload that represents a request to remove the specified file, presumably previously transferred in a payload during an earlier request. |
void |
requestFileRemoval(java.net.URI fileURI,
java.lang.String dataRequestName,
java.util.Properties props,
boolean isRecursive)
Adds a part to the payload that represents a request to remove the specified file, presumably previously transferred in a payload during an earlier request. |
void |
requestFileReplacement(java.lang.String contentType,
java.net.URI fileURI,
java.lang.String dataRequestName,
java.util.Properties props,
java.io.File file,
boolean isRecursive)
Adds a part to the payload to request that the specified file be replaced. |
void |
writeTo(java.io.OutputStream os)
Writes the parts already added to the payload to the specified OutputStream. |
| Method Detail |
|---|
void addPart(java.lang.String contentType,
java.lang.String name,
java.util.Properties props,
java.lang.String content)
throws java.io.IOException
contentType - content type of the partname - name to be assigned to the partprops - Properties to be included with the partcontent - String containing the content for the part
java.io.IOException
void addPart(java.lang.String contentType,
java.lang.String name,
java.util.Properties props,
java.io.InputStream content)
throws java.io.IOException
contentType - content type of the partname - name to be assigned to the partprops - Properties to be included with the partcontent - InputStream furnishing the content for this part
java.io.IOException
void addPart(int index,
java.lang.String contentType,
java.lang.String name,
java.util.Properties props,
java.io.InputStream content)
throws java.io.IOException
index - position (zero-based) where the part should be addedcontentType - content type of the partname - name to be assigned to thepartprops - Properties to be included with the partcontent - InputStream furnishing the content for this part
java.io.IOException
void attachFile(java.lang.String contentType,
java.net.URI fileURI,
java.lang.String dataRequestName,
java.io.File file)
throws java.io.IOException
If the file argument specifies a directory, only the
directory - not its contents - are attached to the payload. To
include the directory and its contents use attachFile(java.lang.String, java.net.URI, java.lang.String, java.io.File, boolean)
and specify the recursive argument as true.
contentType - content type of the partfileURI - URI relative to which the part's name should be computeddataRequestName - name identifying which part of a request this file answersfile - File containing the content for the part
java.io.IOException
void attachFile(java.lang.String contentType,
java.net.URI fileURI,
java.lang.String dataRequestName,
java.io.File file,
boolean isRecursive)
throws java.io.IOException
contentType - content type of the partfileURI - URI relative to which the part's name should be computeddataRequestName - name identifying which part of a request this file answersfile - File containing the content for the partisRecursive - if file is a directory, whether to add its contents as well
java.io.IOException
void attachFile(java.lang.String contentType,
java.net.URI fileURI,
java.lang.String dataRequestName,
java.util.Properties props,
java.io.File file)
throws java.io.IOException
contentType - content type of the partfileURI - URI relative to which the part's name should be computeddataRequestName - name identifying which part of a request this file answersprops - Properties to be included with the partfile - File containing the content for the part
java.io.IOException
void attachFile(java.lang.String contentType,
java.net.URI fileURI,
java.lang.String dataRequestName,
java.util.Properties props,
java.io.File file,
boolean isRecursive)
throws java.io.IOException
contentType - content type of the partfileURI - URI relative to which the part's name should be computeddataRequestName - name identifying which part of a request this file answersprops - Properties to be included with the partfile - File containing the content for the partisRecursive - if file is a directory, whether to add its contents as well
java.io.IOException
void requestFileRemoval(java.net.URI fileURI,
java.lang.String dataRequestName,
java.util.Properties props)
throws java.io.IOException
fileURI - relative URI of the file for deletiondataRequestName - name identifying which part of a request triggered the file removalprops - Properties to be included with the part
java.io.IOException
void requestFileRemoval(java.net.URI fileURI,
java.lang.String dataRequestName,
java.util.Properties props,
boolean isRecursive)
throws java.io.IOException
fileURI - relative URI of the file for deletiondataRequestName - name identifying which part of a request triggered the file removalprops - Properties to be included with the partisRecursive - if fileURI is a directory, whether to remove its contents as well
java.io.IOException
void requestFileReplacement(java.lang.String contentType,
java.net.URI fileURI,
java.lang.String dataRequestName,
java.util.Properties props,
java.io.File file,
boolean isRecursive)
throws java.io.IOException
If the fileURI translates to a non-directory file on the receiving
system then calling this method will replace the file's contents
on the target with the contents of the file argument.
If the fileURI is for a directory, then if isRecursive is also specified the payload will contain one Part to replace the directory (which will have the result of removing the directory and its contents and then recreating the directory) plus a Part for each file, including subdirectories, below the directory. The intent is to replace the entire directory with new contents.
fileURI - dataRequestName - props - isRecursive -
java.io.IOException
void writeTo(java.io.OutputStream os)
throws java.io.IOException
os - OutputStream to receive the formatted payload
java.io.IOExceptionjava.lang.String getContentType()
java.lang.String getHeaderName()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||