com.unclouded.android
Class Network

java.lang.Object
  extended by com.unclouded.android.Network

public class Network
extends Object

Manages the established network connection.

A Network instance is returned as the result of invoking goOnline() on the Unclouded event loop.
It enables to install one or more NetworkListener objects in order to keep track of the network status.


Constructor Summary
Network()
           
 
Method Summary
 void cancel()
          Cancel all listeners of monitoring the state of the network.
 String toString()
          Returns a string representation of a Network object.
 void whenever(NetworkListener listener)
          Install a NetworkListener to monitor the network status.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Network

public Network()
Method Detail

whenever

public void whenever(NetworkListener listener)
Install a NetworkListener to monitor the network status.

Parameters:
listener - used to trigger callback methods when the state of the network changes.

cancel

public void cancel()
Cancel all listeners of monitoring the state of the network.


toString

public String toString()
Returns a string representation of a Network object.

Overrides:
toString in class Object
Returns:
a string representation of the network.