TypedRest for Java
Public Member Functions | Protected Member Functions | Package Functions | List of all members
net.typedrest.AbstractStreamEndpoint< TEntity, TElementEndpoint extends Endpoint > Class Template Referenceabstract

Base class for building REST endpoints that represents a stream of TEntitys as TElementEndpoints. More...

Inheritance diagram for net.typedrest.AbstractStreamEndpoint< TEntity, TElementEndpoint extends Endpoint >:
net.typedrest.AbstractCollectionEndpoint< TEntity, TElementEndpoint > net.typedrest.GenericStreamEndpoint< TEntity, TElementEndpoint >

Public Member Functions

StoppableObservable< TEntity > getObservable (long startIndex)
 
- Public Member Functions inherited from net.typedrest.AbstractCollectionEndpoint< TEntity, TElementEndpoint >
TElementEndpoint get (String id)
 
TElementEndpoint get (TEntity entity)
 
Optional< Boolean > isReadAllAllowed ()
 
List< TEntity > readAll () throws IOException, IllegalArgumentException, IllegalAccessException, FileNotFoundException
 
Optional< Boolean > isReadRangeAllowed ()
 
PartialResponse< TEntity > readRange (Long from, Long to) throws IOException, IllegalArgumentException, IllegalAccessException, FileNotFoundException, IllegalStateException
 
Optional< Boolean > isCreateAllowed ()
 
TElementEndpoint create (TEntity entity) throws IOException, IllegalArgumentException, IllegalAccessException, FileNotFoundException
 
Optional< Boolean > isCreateAllAllowed ()
 
void createAll (Iterable< TEntity > entities) throws IOException, IllegalArgumentException, IllegalAccessException, FileNotFoundException
 
Optional< Boolean > isSetAllAllowed ()
 
void setAll (Collection< TEntity > entities) throws IOException, IllegalArgumentException, IllegalAccessException, FileNotFoundException
 
- Public Member Functions inherited from net.typedrest.GenericStreamEndpoint< TEntity, TElementEndpoint >
default StoppableObservable< TEntity > getObservable ()
 Provides an observable stream of elements. More...
 
StoppableObservable< TEntity > getObservable (long startIndex)
 Provides an observable stream of elements. More...
 

Protected Member Functions

 AbstractStreamEndpoint (Endpoint referrer, URI relativeUri, Class< TEntity > entityType)
 Creates a new element stream endpoint. More...
 
 AbstractStreamEndpoint (Endpoint referrer, String relativeUri, Class< TEntity > entityType)
 Creates a new element stream endpoint. More...
 
- Protected Member Functions inherited from net.typedrest.AbstractCollectionEndpoint< TEntity, TElementEndpoint >
 AbstractCollectionEndpoint (Endpoint referrer, URI relativeUri, Class< TEntity > entityType)
 Creates a new paged collection endpoint. More...
 
 AbstractCollectionEndpoint (Endpoint referrer, String relativeUri, Class< TEntity > entityType)
 Creates a new paged collection endpoint. More...
 
abstract TElementEndpoint buildElementEndpoint (URI relativeUri)
 Builds a ElementEndpoint for a specific child element of this collection. More...
 
void handleCapabilities (HttpResponse response)
 

Package Functions

StoppableObservable< TEntity > getObservable (final long startIndex, Scheduler scheduler)
 Provides an observable stream of elements. More...
 

Additional Inherited Members

- Protected Attributes inherited from net.typedrest.AbstractCollectionEndpoint< TEntity, TElementEndpoint >
final Class< TEntity > entityType
 

Detailed Description

Base class for building REST endpoints that represents a stream of TEntitys as TElementEndpoints.

Parameters
<TEntity>The type of entity the endpoint represents.
<TElementEndpoint>The specific type of ElementEndpoint to provide for individual TEntitys.

Constructor & Destructor Documentation

◆ AbstractStreamEndpoint() [1/2]

net.typedrest.AbstractStreamEndpoint< TEntity, TElementEndpoint extends Endpoint >.AbstractStreamEndpoint ( Endpoint  referrer,
URI  relativeUri,
Class< TEntity >  entityType 
)
protected

Creates a new element stream endpoint.

Parameters
referrerThe endpoint used to navigate to this one.
relativeUriThe URI of this endpoint relative to the referrer's. Missing trailing slash will be appended automatically.
entityTypeThe type of entity the endpoint represents.

◆ AbstractStreamEndpoint() [2/2]

net.typedrest.AbstractStreamEndpoint< TEntity, TElementEndpoint extends Endpoint >.AbstractStreamEndpoint ( Endpoint  referrer,
String  relativeUri,
Class< TEntity >  entityType 
)
protected

Creates a new element stream endpoint.

Parameters
referrerThe endpoint used to navigate to this one.
relativeUriThe URI of this endpoint relative to the referrer's. Missing trailing slash will be appended automatically. Prefix ./ to append a trailing slash to the parent URI if missing.
entityTypeThe type of entity the endpoint represents.

Member Function Documentation

◆ getObservable()

StoppableObservable<TEntity> net.typedrest.AbstractStreamEndpoint< TEntity, TElementEndpoint extends Endpoint >.getObservable ( final long  startIndex,
Scheduler  scheduler 
)
package

Provides an observable stream of elements.

Parameters
startIndexThe index of the first element to return in the stream. Use negative values to start counting from the end of the stream.
schedulerThe scheduler used to run the background thread.
Returns
An observable stream of elements.

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