Package com.adobe.xfa.protocol
Interface Protocol
-
- All Known Implementing Classes:
SysProtocol
public interface ProtocolA interface that all Internet protocol objects must implement.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classProtocol.MultiPartDescRepresents multipart/form-data in a request.static classProtocol.PostRsvpRepresents the result of a form data post.static classProtocol.SectionDataOptionDescribes an entry in a multipart MIME section in a multipart/form-data media type.static classProtocol.SimplePostDataRepresents simple POST data.static classProtocol.TrustTypeAn enumeration of trust enforcement rules.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.io.InputStreamget(java.lang.String sUrl)Gets (downloads) the data designated by the given URL.AuthenticationHandlergetAuthenticationHandler()Gets the protocol's authentication handler.java.net.URLStreamHandlergetURLStreamHandler()Gets the protocol's URL stream handler.booleanisTrusted(java.lang.String sURL, Protocol.TrustType eTrustType, boolean bThrow)Determines if the given URL can be trusted according to the given type of enforcement rule.Protocol.PostRsvppost(Protocol.SimplePostData data, java.lang.String sUrl)Posts simple form data to the given URL.Protocol.PostRsvppost(java.util.List<? extends Protocol.MultiPartDesc> data, java.lang.String sUrl)Posts multipart form data to the given URL.voidput(java.io.InputStream inputStream, java.lang.String sUrl)Puts (uploads) the given input stream's data to the given URL.voidput(java.lang.String sFileName, java.lang.String sUrl)Puts (uploads) the given file's data to the given URL.java.lang.Stringscheme()Gets the protocol's scheme.
-
-
-
Method Detail
-
scheme
java.lang.String scheme()
Gets the protocol's scheme. This method is required for all implementations of custom protocols and must return a non-null, non-empty value.- Returns:
- this protocol's scheme.
-
get
java.io.InputStream get(java.lang.String sUrl)
Gets (downloads) the data designated by the given URL.- Parameters:
sUrl- the URL to be downloaded.- Returns:
- an InputStream that contains the downloaded data.
-
put
void put(java.lang.String sFileName, java.lang.String sUrl)Puts (uploads) the given file's data to the given URL. The protocol designated must support uploading, e.g., http[s] PUT, or ftp[s] STOR.- Parameters:
sFileName- the file to be uploaded.sUrl- the URL to upload the file to.
-
put
void put(java.io.InputStream inputStream, java.lang.String sUrl)Puts (uploads) the given input stream's data to the given URL. The protocol designated must support uploading, e.g., http[s] PUT, or ftp[s] STOR.- Parameters:
inputStream- the input stream to be uploaded.sUrl- the URL to upload the input stream to.
-
post
Protocol.PostRsvp post(Protocol.SimplePostData data, java.lang.String sUrl)
Posts simple form data to the given URL. Only http[s] protocols support posting of data.- Parameters:
data- a description of the simple form data being posted to the URL.sUrl- the URL to post the data to.- Returns:
- a PostRsvp object containing the server's response. the server designed.
-
post
Protocol.PostRsvp post(java.util.List<? extends Protocol.MultiPartDesc> data, java.lang.String sUrl)
Posts multipart form data to the given URL. Only http[s] protocols support posting of data.- Parameters:
data- a description of the multipart form data being posted to the URL.sUrl- the URL to post the data to.- Returns:
- a PostRsvp object containing the server's response.
-
getAuthenticationHandler
AuthenticationHandler getAuthenticationHandler()
Gets the protocol's authentication handler.- Returns:
- an AuthenticationHandler, or
null.
-
isTrusted
boolean isTrusted(java.lang.String sURL, Protocol.TrustType eTrustType, boolean bThrow)Determines if the given URL can be trusted according to the given type of enforcement rule.- Parameters:
sURL- the URL to be trusted.eTrustType- the type of trust enforcement needed.bThrow- whentrue, requests that a trust exception (ExFull) be thrown if the URL is not trusted.- Returns:
trueif trusted, otherwisefalse.
-
getURLStreamHandler
java.net.URLStreamHandler getURLStreamHandler()
Gets the protocol's URL stream handler. This method is required for all implementations of custom protocols and must return a non-null value.- Returns:
- an URL stream handler.
-
-