TypedRest for Java
Public Member Functions | List of all members
net.typedrest.GenericStreamEndpoint< TEntity, TElementEndpoint extends Endpoint > Interface Template Reference

REST endpoint that represents a stream of TEntitys as TElementEndpoints. More...

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

Public Member Functions

default StoppableObservable< TEntity > getObservable ()
 Provides an observable stream of elements. More...
 
StoppableObservable< TEntity > getObservable (long startIndex)
 Provides an observable stream of elements. More...
 
- Public Member Functions inherited from net.typedrest.GenericCollectionEndpoint< TEntity, TElementEndpoint >
Class< TEntity > getEntityType ()
 Returns the type of entity the endpoint represents. More...
 
TElementEndpoint get (String id)
 Returns a ElementEndpoint for a specific child element of this collection. More...
 
TElementEndpoint get (TEntity entity)
 Returns a ElementEndpoint for a specific child element of this collection. More...
 
Optional< Boolean > isReadAllAllowed ()
 Shows whether the server has indicated that readAll() is currently allowed. More...
 
List< TEntity > readAll () throws IOException, IllegalArgumentException, IllegalAccessException, FileNotFoundException, IllegalStateException
 Returns all TEntitys. More...
 
Optional< Boolean > isReadRangeAllowed ()
 Shows whether the server has indicated that readRange(Long,Long) is allowed. More...
 
PartialResponse< TEntity > readRange (Long from, Long to) throws IOException, IllegalArgumentException, IllegalAccessException, FileNotFoundException, IllegalStateException
 Returns all TElementEndpoints within a specific range of the set. More...
 
Optional< Boolean > isCreateAllowed ()
 Shows whether the server has indicated that create(java.lang.Object) is currently allowed. More...
 
TElementEndpoint create (TEntity entity) throws IOException, IllegalArgumentException, IllegalAccessException, FileNotFoundException, IllegalStateException
 Creates a new TEntity. More...
 
Optional< Boolean > isCreateAllAllowed ()
 Shows whether the server has indicated that createAll(java.lang.Iterable) is currently allowed. More...
 
void createAll (Iterable< TEntity > entities) throws IOException, IllegalArgumentException, IllegalAccessException, FileNotFoundException, IllegalStateException
 Creates multiple new TEntitys. More...
 
Optional< Boolean > isSetAllAllowed ()
 Shows whether the server has indicated that setAll(java.util.Collection) is currently allowed. More...
 
void setAll (Collection< TEntity > entities) throws IOException, IllegalArgumentException, IllegalAccessException, FileNotFoundException
 Replaces the entire content of the collection with new TEntitys. More...
 

Detailed Description

REST endpoint that represents a stream of TEntitys as TElementEndpoints.

Use the more constrained StreamEndpoint when possible.

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

Member Function Documentation

◆ getObservable() [1/2]

default StoppableObservable<TEntity> net.typedrest.GenericStreamEndpoint< TEntity, TElementEndpoint extends Endpoint >.getObservable ( )

Provides an observable stream of elements.

Returns
An observable stream of elements.

◆ getObservable() [2/2]

StoppableObservable<TEntity> net.typedrest.GenericStreamEndpoint< TEntity, TElementEndpoint extends Endpoint >.getObservable ( long  startIndex)

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.
Returns
An observable stream of elements.

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