|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.vodafone360.people.service.agent.NetworkAgentState
public class NetworkAgentState
Stores information about the current status of the NetworkAgent, i.e. whether we are connected to the Internet, whether the network is available, if Wifi is active, whether roaming or data roaming are enabled etc.
Field Summary | |
---|---|
private boolean[] |
changes
|
private NetworkAgent.AgentState |
mAgentState
|
private boolean |
mBackgroundDataAllowed
|
private boolean |
mDataRoamingAllowed
|
private NetworkAgent.AgentDisconnectReason |
mDisconnectReason
|
private boolean |
mInternetConnected
|
private boolean |
mIsInBackground
|
private boolean |
mIsRoaming
|
private boolean |
mNetworkWorking
|
private boolean |
mWifiActive
|
Constructor Summary | |
---|---|
NetworkAgentState()
|
Method Summary | |
---|---|
NetworkAgent.AgentState |
getAgentState()
Get current NetworkAgent state. |
boolean[] |
getChanges()
Get which values should be overridden on the Network Agent. |
NetworkAgent.AgentDisconnectReason |
getDisconnectReason()
Return reason for NetworkAgent entering disconnected state. |
boolean |
isBackDataAllowed()
Return if background data connections are allowed. |
boolean |
isInBackGround()
Return whether application is in the background. |
boolean |
isInternetConnected()
Return whether we are connected to the Internet. |
boolean |
isNetworkWorking()
Return whether the network is currently available. |
boolean |
isRoaming()
Return whether roaming is currently enabled. |
boolean |
isRoamingAllowed()
Return data roaming state. |
boolean |
isWifiActive()
Return whether Wifi is active. |
void |
setAgentState(NetworkAgent.AgentState mAgentState)
Sets a new NetworkAgent state. |
void |
setBackgroundDataAllowed(boolean backgroundDataAllowed)
Set if background data connections are allowed. |
void |
setChanges(boolean[] changes)
Set which values should be overridden on the Network Agent. |
void |
setDisconnectReason(NetworkAgent.AgentDisconnectReason disconnectReason)
Set reason for setting NetworkAgent to disconnected state. |
void |
setInBackGround(boolean isBackGround)
Set application background state. |
void |
setInternetConnected(boolean internetConnected)
Sets a new Internet connection state. |
void |
setNetworkWorking(boolean networkWorking)
Set whether network is currently available. |
void |
setRoaming(boolean dataRoaming)
Set roaming state. |
void |
setRoamingAllowed(boolean dataRoamingAllowed)
Set whether roaming is allowed. |
void |
setWifiActive(boolean wifiActive)
Set Wifi active state. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private NetworkAgent.AgentState mAgentState
private NetworkAgent.AgentDisconnectReason mDisconnectReason
private boolean mInternetConnected
private boolean mIsRoaming
private boolean mDataRoamingAllowed
private boolean mIsInBackground
private boolean mBackgroundDataAllowed
private boolean mWifiActive
private boolean mNetworkWorking
private boolean[] changes
Constructor Detail |
---|
public NetworkAgentState()
Method Detail |
---|
public NetworkAgent.AgentState getAgentState()
public void setAgentState(NetworkAgent.AgentState mAgentState)
mAgentState
- current NetworkAgent state {connected | disconnected |
unknown}public boolean isInternetConnected()
public void setInternetConnected(boolean internetConnected)
internetConnected
- TRUE if connected to Internet, FALSE otherwise.public boolean isRoaming()
public void setRoaming(boolean dataRoaming)
dataRoaming
- TRUE if enabled, FALSE otherwise.public boolean isRoamingAllowed()
public void setRoamingAllowed(boolean dataRoamingAllowed)
dataRoamingAllowed
- TRUE if roaming allowed.public boolean isInBackGround()
public void setInBackGround(boolean isBackGround)
isBackGround
- TRUE if application is in the background.public boolean isWifiActive()
public void setWifiActive(boolean wifiActive)
wifiActive
- TRUE if Wifi is active.public boolean isNetworkWorking()
public void setNetworkWorking(boolean networkWorking)
networkWorking
- TRUE if network is available, FALSE otherwise.public NetworkAgent.AgentDisconnectReason getDisconnectReason()
public void setDisconnectReason(NetworkAgent.AgentDisconnectReason disconnectReason)
disconnectReason
- NetworkAgent disconnect reason.public void setBackgroundDataAllowed(boolean backgroundDataAllowed)
backgroundDataAllowed
- TRUE if background data connections are
permitted, FALSE otherwise.public boolean isBackDataAllowed()
public boolean[] getChanges()
public void setChanges(boolean[] changes)
changes
- Array of StatesOfService values.public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
JavaDoc