|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.vodafone360.people.service.transport.ConnectionManager
public class ConnectionManager
ConnectionManager - responsible for controlling the current connection Connects and disconnects based on network availability etc and start or stops RPG polling. Currently handles HTTP connections - this will be extended to support TCP sockets.
Field Summary | |
---|---|
private IConnection |
mConnection
|
private DecoderThread |
mDecoder
|
private static ConnectionManager |
mInstance
|
private RemoteService |
mService
|
Constructor Summary | |
---|---|
private |
ConnectionManager()
|
Method Summary | |
---|---|
void |
connect(RemoteService service)
|
void |
disconnect()
|
void |
free()
Note: only called from tests. |
private IConnection |
getAutodetectedConnection(RemoteService service)
Returns an autodetected connection. |
static ConnectionManager |
getInstance()
|
void |
notifyOfItemInRequestQueue()
Notifies the implementation that a new request is available in the queue and should trigger its delivery to the backend. |
void |
notifyOfUiActivity()
|
void |
onLoginStateChanged(boolean loggedIn)
|
void |
setTestConnection(IConnection testConn)
Enable test connection (for Unit testing purposes) |
private void |
unsubscribeFromQueueEvents()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static ConnectionManager mInstance
private IConnection mConnection
private RemoteService mService
private DecoderThread mDecoder
Constructor Detail |
---|
private ConnectionManager()
Method Detail |
---|
public static ConnectionManager getInstance()
public void connect(RemoteService service)
private IConnection getAutodetectedConnection(RemoteService service)
public void disconnect()
public void onLoginStateChanged(boolean loggedIn)
onLoginStateChanged
in interface LoginEngine.ILoginEventsListener
public void notifyOfItemInRequestQueue()
IQueueListener
notifyOfItemInRequestQueue
in interface IQueueListener
public void notifyOfUiActivity()
private void unsubscribeFromQueueEvents()
public void free()
public void setTestConnection(IConnection testConn)
testConn
- handle to test connection
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
JavaDoc