CONFIGURATION - The implementation class type.public abstract class PipeConfiguration<CONFIGURATION extends PipeConfiguration<CONFIGURATION>> extends Object implements org.jboss.aerogear.android.core.Config<CONFIGURATION>
| Constructor and Description |
|---|
PipeConfiguration() |
| Modifier and Type | Method and Description |
|---|---|
CONFIGURATION |
addOnPipeCreatedListener(OnPipeCreatedListener listener)
OnPipeCreatedListseners are a collection of classes to be notified when
the configuration of the Pipe is complete.
|
protected abstract <DATA> Pipe<DATA> |
buildPipeForClass(Class<DATA> aClass)
Validates configuration parameters and returns a Pipe instance.
|
<DATA> Pipe<DATA> |
forClass(Class<DATA> aClass)
Creates a pipe based on the current configuration and notifies all listeners
|
abstract List<PipeModule> |
getModules()
Modules are bits of functionality which are called during a Pipes
lifecycle.
|
String |
getName()
The name is the key which is used to reference the created pipe in
PipeManager.
|
Collection<OnPipeCreatedListener> |
getOnPipeCreatedListeners()
OnPipeCreatedListseners are a collection of classes to be notified when
the configuration of the Pipe is complete.
|
abstract CONFIGURATION |
module(PipeModule module)
Modules are bits of functionality which are called during a Pipes
lifecycle.
|
abstract CONFIGURATION |
pageConfig(PageConfig pageConfig)
Paging is controlled and managed by the pageConfig objects
|
abstract CONFIGURATION |
requestBuilder(RequestBuilder builder)
Request builders are responsible for serializing the objects provided
to the Pipe into binary streams for consumption by a service.
|
abstract CONFIGURATION |
responseParser(ResponseParser responseParser)
Response Parsers turn service responses into Objects for the Pipe.
|
CONFIGURATION |
setName(String name)
The name is the key which is used to reference the created pipe in
PipeManager.
|
CONFIGURATION |
setOnPipeCreatedListeners(Collection<OnPipeCreatedListener> listeners)
OnPipeCreatedListseners are a collection of classes to be notified when
the configuration of the Pipe is complete.
|
abstract CONFIGURATION |
timeout(Integer timeout)
Because of their async nature, Pipes need to have a timeout which will
error if reached.
|
abstract CONFIGURATION |
withUrl(URL url)
The URL is a location of some resource or service the Pipe will interact with.
|
public String getName()
getName in interface org.jboss.aerogear.android.core.Config<CONFIGURATION extends PipeConfiguration<CONFIGURATION>>public CONFIGURATION setName(String name)
setName in interface org.jboss.aerogear.android.core.Config<CONFIGURATION extends PipeConfiguration<CONFIGURATION>>name - new namepublic Collection<OnPipeCreatedListener> getOnPipeCreatedListeners()
public CONFIGURATION addOnPipeCreatedListener(OnPipeCreatedListener listener)
listener - new listener to add to the collectionpublic CONFIGURATION setOnPipeCreatedListeners(Collection<OnPipeCreatedListener> listeners)
listeners - new collection to replace the current onepublic final <DATA> Pipe<DATA> forClass(Class<DATA> aClass)
DATA - The data type of the PipeaClass - The data type class of the PipeIllegalStateException - if the Pipe can not be constructed.protected abstract <DATA> Pipe<DATA> buildPipeForClass(Class<DATA> aClass)
DATA - The data type of the PipeaClass - The data type class of the PipeIllegalStateException - if the Pipe can not be constructed.public abstract CONFIGURATION withUrl(URL url)
url - the base URL the pipe will build upon.public abstract CONFIGURATION module(PipeModule module)
module - a module to add to the lifecycle.public abstract List<PipeModule> getModules()
public abstract CONFIGURATION timeout(Integer timeout)
timeout - an amount of time in milliseconds.public abstract CONFIGURATION pageConfig(PageConfig pageConfig)
pageConfig - a pageConfigurationpublic abstract CONFIGURATION requestBuilder(RequestBuilder builder)
builder - the requestBuilderpublic abstract CONFIGURATION responseParser(ResponseParser responseParser)
responseParser - a resonse Parser instanceCopyright © 2016 JBoss by Red Hat. All rights reserved.