TypedRest for Java
Public Member Functions | List of all members
net.typedrest.ConsumerEndpoint< TEntity > Interface Template Reference

REST endpoint that represents an RPC-like action which takes TEntity as input. More...

Inheritance diagram for net.typedrest.ConsumerEndpoint< TEntity >:
net.typedrest.TriggerEndpoint net.typedrest.Endpoint net.typedrest.ConsumerEndpointImpl< TEntity >

Public Member Functions

Class< TEntity > getEntityType ()
 Returns the type of entity the endpoint takes as input. More...
 
void trigger (TEntity entity) throws IOException, IllegalArgumentException, IllegalAccessException, FileNotFoundException, IllegalStateException
 Triggers the action. More...
 
- Public Member Functions inherited from net.typedrest.TriggerEndpoint
Optional< Boolean > isTriggerAllowed ()
 Shows whether the server has indicated that the trigger method is currently allowed. More...
 
void probe () throws IOException, IllegalArgumentException, IllegalAccessException, FileNotFoundException, IllegalStateException
 Queries the server about capabilities of the endpoint without performing any action. More...
 
- Public Member Functions inherited from net.typedrest.Endpoint
URI getUri ()
 The HTTP URI of the remote resource. More...
 
Executor getExecutor ()
 The REST executor used to communicate with the remote resource. More...
 
ObjectMapper getSerializer ()
 Controls the serialization of entities sent to and received from the server. More...
 
Set< URI > getLinks (String rel)
 Retrieves all links with a specific relation type cached from the last request. More...
 
Map< URI, String > getLinksWithTitles (String rel)
 Retrieves all links (with titles) with a specific relation type cached from the last request. More...
 
URI link (String rel)
 Retrieves a single link with a specific relation type. More...
 
UriTemplate linkTemplate (String rel)
 Retrieves a link template with a specific relation type. More...
 
default URI linkTemplate (String rel, String variableName, Object value)
 Retrieves a link template with a specific relation type and resolves it. More...
 

Detailed Description

REST endpoint that represents an RPC-like action which takes TEntity as input.

Parameters
<TEntity>The type of entity the endpoint takes as input.

Member Function Documentation

◆ getEntityType()

Class<TEntity> net.typedrest.ConsumerEndpoint< TEntity >.getEntityType ( )

Returns the type of entity the endpoint takes as input.

Returns
The class type.

◆ trigger()

void net.typedrest.ConsumerEndpoint< TEntity >.trigger ( TEntity  entity) throws IOException, IllegalArgumentException, IllegalAccessException, FileNotFoundException, IllegalStateException

Triggers the action.

Parameters
entityThe TEntity to post as input.
Exceptions
IOExceptionNetwork communication failed.
IllegalArgumentExceptionHttpStatus#SC_BAD_REQUEST
IllegalAccessExceptionHttpStatus#SC_UNAUTHORIZED or HttpStatus#SC_FORBIDDEN
FileNotFoundExceptionHttpStatus#SC_NOT_FOUND or HttpStatus#SC_GONE
IllegalStateExceptionHttpStatus#SC_CONFLICT
RuntimeExceptionOther non-success status code.

Implemented in net.typedrest.ConsumerEndpointImpl< TEntity >.


The documentation for this interface was generated from the following file: