Package org.apache.pivot.web
Class PutQuery
- java.lang.Object
-
- org.apache.pivot.util.concurrent.Task<V>
-
- org.apache.pivot.io.IOTask<V>
-
- org.apache.pivot.web.Query<java.lang.Boolean>
-
- org.apache.pivot.web.PutQuery
-
public class PutQuery extends Query<java.lang.Boolean>
Executes an HTTP PUT operation.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.pivot.web.Query
Query.Method, Query.Status
-
Nested classes/interfaces inherited from class org.apache.pivot.io.IOTask
IOTask.MonitoredInputStream, IOTask.MonitoredOutputStream
-
-
Field Summary
Fields Modifier and Type Field Description static Query.Method
METHOD
-
Fields inherited from class org.apache.pivot.web.Query
DEFAULT_PORT
-
Fields inherited from class org.apache.pivot.io.IOTask
bytesReceived, bytesSent
-
Fields inherited from class org.apache.pivot.util.concurrent.Task
abort, DEFAULT_EXECUTOR_SERVICE, timeout
-
-
Constructor Summary
Constructors Constructor Description PutQuery(java.lang.String hostname, int port, java.lang.String path, boolean secure)
PutQuery(java.lang.String hostname, int port, java.lang.String path, boolean secure, java.util.concurrent.ExecutorService executorService)
PutQuery(java.lang.String hostname, java.lang.String path)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Boolean
execute()
Synchronously executes the PUT operation.Query.Method
getMethod()
java.lang.Object
getValue()
Returns the value that will be PUT to the server when the query is executed.void
setValue(java.lang.Object value)
Sets the value that will be PUT 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 org.apache.pivot.util.concurrent.Task
abort, execute, execute, getBackgroundThread, getExecutorService, getFault, getResult, getTimeout, isPending, setTimeout
-
-
-
-
Field Detail
-
METHOD
public static final Query.Method METHOD
-
-
Constructor Detail
-
PutQuery
public PutQuery(java.lang.String hostname, java.lang.String path)
-
PutQuery
public PutQuery(java.lang.String hostname, int port, java.lang.String path, boolean secure)
-
PutQuery
public PutQuery(java.lang.String hostname, int port, java.lang.String path, boolean secure, java.util.concurrent.ExecutorService executorService)
-
-
Method Detail
-
getMethod
public Query.Method getMethod()
-
getValue
public java.lang.Object getValue()
Returns the value that will be PUT to the server when the query is executed.- Returns:
- The value to send.
-
setValue
public void setValue(java.lang.Object value)
Sets the value that will be PUT to the server when the query is executed.- Parameters:
value
- The value to PUT to the server.
-
execute
public java.lang.Boolean execute() throws QueryException
Synchronously executes the PUT operation.- Specified by:
execute
in classTask<java.lang.Boolean>
- Returns:
true
if the operation resulted in the creation of a server resource;false
, otherwise.- Throws:
QueryException
-
-