public abstract class AbstractAsynchronousConnection extends Object implements Connection
Modifier | Constructor and Description |
---|---|
protected |
AbstractAsynchronousConnection()
Creates a new abstract asynchronous connection.
|
Modifier and Type | Method and Description |
---|---|
ActionResponse |
action(Context context,
ActionRequest request)
Performs an action against a specific resource, or set of resources.
|
ResourceResponse |
create(Context context,
CreateRequest request)
Adds a new JSON resource.
|
ResourceResponse |
delete(Context context,
DeleteRequest request)
Deletes a JSON resource.
|
ResourceResponse |
patch(Context context,
PatchRequest request)
Updates a JSON resource by applying a set of changes to its existing
content.
|
QueryResponse |
query(Context context,
QueryRequest request,
Collection<? super ResourceResponse> results)
Searches for all JSON resources matching a user specified set of
criteria, and places the results in the provided collection.
|
QueryResponse |
query(Context context,
QueryRequest request,
QueryResourceHandler handler)
Searches for all JSON resources matching a user specified set of
criteria, and returns a
Promise that will be completed with the
results of the search. |
ResourceResponse |
read(Context context,
ReadRequest request)
Reads a JSON resource.
|
ResourceResponse |
update(Context context,
UpdateRequest request)
Updates a JSON resource by replacing its existing content with new
content.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
actionAsync, close, createAsync, deleteAsync, isClosed, isValid, patchAsync, queryAsync, readAsync, updateAsync
protected AbstractAsynchronousConnection()
public ActionResponse action(Context context, ActionRequest request) throws ResourceException
Connection
action
in interface Connection
context
- The request context, such as associated principal.request
- The action request.ResourceException
- If the action could not be performed.public ResourceResponse create(Context context, CreateRequest request) throws ResourceException
Connection
create
in interface Connection
context
- The request context, such as associated principal.request
- The create request.ResourceException
- If the JSON resource could not be created.public ResourceResponse delete(Context context, DeleteRequest request) throws ResourceException
Connection
delete
in interface Connection
context
- The request context, such as associated principal.request
- The delete request.ResourceException
- If the JSON resource could not be deleted.public ResourceResponse patch(Context context, PatchRequest request) throws ResourceException
Connection
patch
in interface Connection
context
- The request context, such as associated principal.request
- The update request.ResourceException
- If the JSON resource could not be updated.public QueryResponse query(Context context, QueryRequest request, QueryResourceHandler handler) throws ResourceException
Connection
Promise
that will be completed with the
results of the search.
Result processing happens-before this method returns to the caller.
query
in interface Connection
context
- The request context, such as associated principal.request
- The query request.handler
- A query resource handler which can be used to process
matching resources as they are received.ResourceException
- If the query could not be performed.public QueryResponse query(Context context, QueryRequest request, Collection<? super ResourceResponse> results) throws ResourceException
Connection
query
in interface Connection
context
- The request context, such as associated principal.request
- The query request.results
- A collection into which matching resources will be added as
they are received.ResourceException
- If the query could not be performed.public ResourceResponse read(Context context, ReadRequest request) throws ResourceException
Connection
read
in interface Connection
context
- The request context, such as associated principal.request
- The read request.ResourceException
- If the JSON resource could not be read.public ResourceResponse update(Context context, UpdateRequest request) throws ResourceException
Connection
update
in interface Connection
context
- The request context, such as associated principal.request
- The update request.ResourceException
- If the JSON resource could not be updated.Copyright © 2010-2018, ForgeRock All Rights Reserved.