org.apache.pivot.web
Class PutQuery

java.lang.Object
  extended by org.apache.pivot.util.concurrent.Task<V>
      extended by org.apache.pivot.io.IOTask<V>
          extended by org.apache.pivot.web.Query<Boolean>
              extended by org.apache.pivot.web.PutQuery

public class PutQuery
extends Query<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
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
PutQuery(String hostname, int port, String path, boolean secure)
           
PutQuery(String hostname, int port, String path, boolean secure, ExecutorService executorService)
           
PutQuery(String hostname, String path)
           
 
Method Summary
 Boolean execute()
          Synchronously executes the PUT operation.
 Query.Method getMethod()
           
 Object getValue()
          Returns the value that will be PUT to the server when the query is executed.
 void setValue(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, getExecutorService, getFault, getResult, getTimeout, isPending, setTimeout
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

METHOD

public static final Query.Method METHOD
Constructor Detail

PutQuery

public PutQuery(String hostname,
                String path)

PutQuery

public PutQuery(String hostname,
                int port,
                String path,
                boolean secure)

PutQuery

public PutQuery(String hostname,
                int port,
                String path,
                boolean secure,
                ExecutorService executorService)
Method Detail

getMethod

public Query.Method getMethod()
Specified by:
getMethod in class Query<Boolean>

getValue

public Object getValue()
Returns the value that will be PUT to the server when the query is executed.


setValue

public void setValue(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 Boolean execute()
                throws QueryException
Synchronously executes the PUT operation.

Specified by:
execute in class Task<Boolean>
Returns:
true if the operation resulted in the creation of a server resource; false, otherwise.
Throws:
QueryException