org.apache.pivot.web
Class PostQuery
java.lang.Object
org.apache.pivot.util.concurrent.Task<V>
org.apache.pivot.io.IOTask<V>
org.apache.pivot.web.Query<URL>
org.apache.pivot.web.PostQuery
public class PostQuery
- extends Query<URL>
Executes an HTTP POST operation.
Method Summary |
URL |
execute()
Synchronously executes the POST operation. |
Query.Method |
getMethod()
|
Object |
getValue()
Returns the value that will be POSTed to the server when the query is
executed. |
void |
setValue(Object value)
Sets the value that will be POSTed to the server when the query is
executed. |
Methods inherited from class org.apache.pivot.web.Query |
execute, getBytesExpected, getBytesReceived, getBytesSent, getHostname, getHostnameVerifier, getLocation, getParameters, getPath, getPort, getProxy, getQueryListeners, getRequestHeaders, getResponseHeaders, getSerializer, getStatus, isSecure, setHostnameVerifier, setProxy, setSerializer |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
METHOD
public static final Query.Method METHOD
PostQuery
public PostQuery(String hostname,
String path)
PostQuery
public PostQuery(String hostname,
int port,
String path,
boolean secure)
PostQuery
public PostQuery(String hostname,
int port,
String path,
boolean secure,
ExecutorService executorService)
getMethod
public Query.Method getMethod()
- Specified by:
getMethod
in class Query<URL>
getValue
public Object getValue()
- Returns the value that will be POSTed to the server when the query is
executed.
setValue
public void setValue(Object value)
- Sets the value that will be POSTed to the server when the query is
executed.
- Parameters:
value
- The value to POST to the server.
execute
public URL execute()
throws QueryException
- Synchronously executes the POST operation.
- Specified by:
execute
in class Task<URL>
- Returns:
- A URL that uniquely identifies the location of the resource created
on the server by the operation, or null if the server did
not return a location.
- Throws:
QueryException