pivot.web
Class GetQuery

java.lang.Object
  extended by pivot.util.concurrent.Task<V>
      extended by pivot.io.IOTask<V>
          extended by pivot.web.Query<Object>
              extended by pivot.web.GetQuery

public class GetQuery
extends Query<Object>

Executes an HTTP GET operation.

Author:
gbrown

Nested Class Summary
 
Nested classes/interfaces inherited from class pivot.web.Query
Query.Method, Query.Status
 
Nested classes/interfaces inherited from class pivot.io.IOTask
IOTask.MonitoredInputStream, IOTask.MonitoredOutputStream
 
Field Summary
static Query.Method METHOD
           
 
Fields inherited from class pivot.web.Query
DEFAULT_DISPATCHER, DEFAULT_PORT
 
Fields inherited from class pivot.io.IOTask
bytesReceived, bytesSent
 
Fields inherited from class pivot.util.concurrent.Task
abort, timeout
 
Constructor Summary
GetQuery(String hostname, int port, String path, boolean secure)
           
GetQuery(String hostname, String path)
           
 
Method Summary
 Object execute()
          Synchronously executes the GET operation.
 Query.Method getMethod()
           
 
Methods inherited from class pivot.web.Query
execute, getBytesExpected, getBytesReceived, getBytesSent, getHostname, getHostnameVerifier, getLocation, getParameters, getPath, getPort, getQueryListeners, getRequestHeaders, getResponseHeaders, getSerializer, getStatus, isSecure, setHostnameVerifier, setSerializer
 
Methods inherited from class pivot.util.concurrent.Task
abort, execute, getDispatcher, 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

GetQuery

public GetQuery(String hostname,
                String path)

GetQuery

public GetQuery(String hostname,
                int port,
                String path,
                boolean secure)
Method Detail

getMethod

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

execute

public Object execute()
               throws QueryException
Synchronously executes the GET operation.

Specified by:
execute in class Task<Object>
Returns:
The result of the operation, deserialized using the query's serializer.
Throws:
QueryException