Package org.apache.pivot.web
Class GetQuery
- java.lang.Object
-
- org.apache.pivot.util.concurrent.Task<V>
-
- org.apache.pivot.io.IOTask<V>
-
- org.apache.pivot.web.Query<java.lang.Object>
-
- org.apache.pivot.web.GetQuery
-
public class GetQuery extends Query<java.lang.Object>
Executes an HTTP GET 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 GetQuery(java.lang.String hostname, int port, java.lang.String path, boolean secure)
GetQuery(java.lang.String hostname, int port, java.lang.String path, boolean secure, java.util.concurrent.ExecutorService executorService)
GetQuery(java.lang.String hostname, java.lang.String path)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
execute()
Synchronously executes the GET operation.Query.Method
getMethod()
-
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
-
GetQuery
public GetQuery(java.lang.String hostname, java.lang.String path)
-
GetQuery
public GetQuery(java.lang.String hostname, int port, java.lang.String path, boolean secure)
-
GetQuery
public GetQuery(java.lang.String hostname, int port, java.lang.String path, boolean secure, java.util.concurrent.ExecutorService executorService)
-
-
Method Detail
-
getMethod
public Query.Method getMethod()
-
execute
public java.lang.Object execute() throws QueryException
Synchronously executes the GET operation.- Specified by:
execute
in classTask<java.lang.Object>
- Returns:
- The result of the operation, deserialized using the query's serializer.
- Throws:
QueryException
-
-