AeroGear Android Library 1.1.0

org.jboss.aerogear.android
Class Pipeline

java.lang.Object
  extended by org.jboss.aerogear.android.Pipeline

public class Pipeline
extends Object

A Pipeline represents a ‘collection’ of server connections (aka Pipes). The Pipeline contains some simple management APIs to create or remove Pipes objects.

As a note, you should NOT extend this class for production or application purposes. This class is made non-final ONLY for testing/mocking/academic purposes.


Constructor Summary
Pipeline(String baseURL)
          An initializer method to instantiate the Pipeline,
Pipeline(URL baseURL)
          An initializer method to instantiate the Pipeline,
Pipeline(URL baseURL, PipeFactory pipeFactory)
          An initializer method to instantiate the Pipeline,
 
Method Summary
 Pipe get(String name)
          Look up for a pipe object.
 LoaderPipe get(String name, android.app.Activity activity)
          Look up for a pipe object.
 LoaderPipe get(String name, android.support.v4.app.FragmentActivity activity)
          Look up for a pipe object.
 LoaderPipe get(String name, android.app.Fragment fragment, android.content.Context applicationContext)
          Look up for a pipe object.
 LoaderPipe get(String name, android.support.v4.app.Fragment fragment, android.content.Context applicationContext)
          Look up for a pipe object.
 Pipe pipe(Class klass)
           
 Pipe pipe(Class klass, PipeConfig config)
           
 Pipe remove(String name)
          Removes a pipe from the Pipeline object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Pipeline

public Pipeline(URL baseURL)
An initializer method to instantiate the Pipeline,

Parameters:
baseURL - the URL of the server

Pipeline

public Pipeline(URL baseURL,
                PipeFactory pipeFactory)
An initializer method to instantiate the Pipeline,

Parameters:
baseURL - the URL of the server
pipeFactory -

Pipeline

public Pipeline(String baseURL)
An initializer method to instantiate the Pipeline,

Parameters:
baseURL - the URL of the server
Throws:
IllegalArgumentException - if baseURL is not a valid URL
Method Detail

pipe

public Pipe pipe(Class klass)

pipe

public Pipe pipe(Class klass,
                 PipeConfig config)

remove

public Pipe remove(String name)
Removes a pipe from the Pipeline object

Parameters:
name - the name of the actual pipe
Returns:
the new created Pipe object

get

public Pipe get(String name)
Look up for a pipe object.

Parameters:
name - the name of the actual pipe
Returns:
the new created Pipe object

get

public LoaderPipe get(String name,
                      android.app.Activity activity)
Look up for a pipe object. This will wrap the Pipe in a Loader.

Parameters:
name - the name of the actual pipe
activity - the activity whose lifecycle the loader will follow
Returns:
the new created Pipe object

get

public LoaderPipe get(String name,
                      android.app.Fragment fragment,
                      android.content.Context applicationContext)
Look up for a pipe object. This will wrap the Pipe in a Loader.

Parameters:
name - the name of the actual pipe
fragment - the Fragment whose lifecycle the activity will follow
applicationContext - the Context of the application.
Returns:
the new created Pipe object

get

public LoaderPipe get(String name,
                      android.support.v4.app.FragmentActivity activity)
Look up for a pipe object. This will wrap the Pipe in a Loader.

Parameters:
name - the name of the actual pipe
activity - the activity whose lifecycle the loader will follow
Returns:
the new created Pipe object

get

public LoaderPipe get(String name,
                      android.support.v4.app.Fragment fragment,
                      android.content.Context applicationContext)
Look up for a pipe object. This will wrap the Pipe in a Loader.

Parameters:
name - the name of the actual pipe
fragment - the Fragment whose lifecycle the activity will follow
applicationContext - the Context of the application.
Returns:
the new created Pipe object

AeroGear Android Library 1.1.0

Copyright © 2013 JBoss by Red Hat. All Rights Reserved.