|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectde.unikassel.android.sdcframework.util.AbstractChainWorker<ProtocolStrategy>
de.unikassel.android.sdcframework.transmission.AbstractConnectionStrategy
public abstract class AbstractConnectionStrategy
Abstract base class for connection strategy types, knowing a successor to
delegate to if the strategy fails.
| Field Summary | |
|---|---|
private ConnectivityWrapper |
connectivityWrapper
The the connectivity wrapper to access network information |
private Class<?> |
controlActivityClass
The control activity class to use for notifications. |
static int |
NOTIFICATION
The notification id |
| Constructor Summary | |
|---|---|
AbstractConnectionStrategy(ConnectivityWrapper connectivityWrapper,
Class<?> controlActivityClass)
Constructor |
|
| Method Summary | |
|---|---|
boolean |
doWork(ProtocolStrategy protocolStrategy)
The work method called by the client |
protected ConnectivityWrapper |
getConnectivityWrapper()
Getter for the connectivity wrapper |
protected boolean |
isConnectionAvailable(Context context,
int networkType,
String hostName)
Internal method to test for an available connection of a specific type |
protected boolean |
process(ProtocolStrategy protocolStrategy)
Processing method of the worker |
| Methods inherited from class de.unikassel.android.sdcframework.util.AbstractChainWorker |
|---|
getSuccessor, setSuccessor, withSuccessor |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface de.unikassel.android.sdcframework.transmission.facade.ConnectionStrategy |
|---|
isConnectionAvailable |
| Methods inherited from interface de.unikassel.android.sdcframework.util.facade.ChainWorker |
|---|
getSuccessor, setSuccessor, withSuccessor |
| Field Detail |
|---|
public static final int NOTIFICATION
private final ConnectivityWrapper connectivityWrapper
private final Class<?> controlActivityClass
| Constructor Detail |
|---|
public AbstractConnectionStrategy(ConnectivityWrapper connectivityWrapper,
Class<?> controlActivityClass)
connectivityWrapper - the connectivity wrapper to usecontrolActivityClass - the control activity class or null| Method Detail |
|---|
protected ConnectivityWrapper getConnectivityWrapper()
public final boolean doWork(ProtocolStrategy protocolStrategy)
ChainWorker
doWork in interface ChainWorker<ProtocolStrategy>doWork in class AbstractChainWorker<ProtocolStrategy>protocolStrategy - the client to do the work for
protected final boolean process(ProtocolStrategy protocolStrategy)
AbstractChainWorker
process in class AbstractChainWorker<ProtocolStrategy>protocolStrategy - the client
protected final boolean isConnectionAvailable(Context context,
int networkType,
String hostName)
context - the application contextnetworkType - the network typehostName - the host name if a rout to host shall be tested, otherwise null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||