edu.ntnu.cikmr.network
Class ConnectionStatus

java.lang.Object
  extended by edu.ntnu.cikmr.network.ConnectionStatus

public class ConnectionStatus
extends java.lang.Object


Field Summary
static int ERROR_CONNECTING_TO_NET_PEER_GROUP
           
static int ERROR_CONNECTING_TO_PEER_GROUP
           
static int ERROR_NONE
           
static int ERROR_TIMED_OUT
           
static int ERROR_UNKNOWN
           
static int STATUS_CONFIGURATING_NETWORK
           
static int STATUS_CONNECTED
           
static int STATUS_CONNECTING_TO_NET_PEER_GROUP
           
static int STATUS_CONNECTING_TO_PEER_GROUP
           
static int STATUS_DISCONNECTED
           
static int STATUS_DISCONNECTING
           
 
Constructor Summary
ConnectionStatus()
           
 
Method Summary
 void addConnectionStatusListener(ConnectionStatusListener connectionStatusListener)
           
protected  void fireConnectionStatusUpdated()
           
 int getErrorCode()
           
 java.lang.String getErrorDescription()
           
 java.lang.String getPeerName()
           
 int getStatus()
           
 boolean hasError()
           
protected  boolean isConfigured()
           
 boolean isConnected()
           
protected  boolean isConnectedToNetPeerGroup()
           
 boolean isConnectionInProgress()
           
 void removeConnectionStatusListener(ConnectionStatusListener connectionStatusListener)
           
protected  void reset()
           
protected  void setConfigured(boolean configured)
           
protected  void setConnectedToNetPeerGroup(boolean connectedToNetPeerGroup)
           
protected  void setErrorCode(int errorCode)
           
protected  void setErrorDescription(java.lang.String errorDescription)
           
protected  void setPeerName(java.lang.String peerName)
           
 void setStatus(int status)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STATUS_DISCONNECTED

public static final int STATUS_DISCONNECTED
See Also:
Constant Field Values

STATUS_CONFIGURATING_NETWORK

public static final int STATUS_CONFIGURATING_NETWORK
See Also:
Constant Field Values

STATUS_CONNECTING_TO_NET_PEER_GROUP

public static final int STATUS_CONNECTING_TO_NET_PEER_GROUP
See Also:
Constant Field Values

STATUS_CONNECTING_TO_PEER_GROUP

public static final int STATUS_CONNECTING_TO_PEER_GROUP
See Also:
Constant Field Values

STATUS_DISCONNECTING

public static final int STATUS_DISCONNECTING
See Also:
Constant Field Values

STATUS_CONNECTED

public static final int STATUS_CONNECTED
See Also:
Constant Field Values

ERROR_NONE

public static final int ERROR_NONE
See Also:
Constant Field Values

ERROR_UNKNOWN

public static final int ERROR_UNKNOWN
See Also:
Constant Field Values

ERROR_TIMED_OUT

public static final int ERROR_TIMED_OUT
See Also:
Constant Field Values

ERROR_CONNECTING_TO_NET_PEER_GROUP

public static final int ERROR_CONNECTING_TO_NET_PEER_GROUP
See Also:
Constant Field Values

ERROR_CONNECTING_TO_PEER_GROUP

public static final int ERROR_CONNECTING_TO_PEER_GROUP
See Also:
Constant Field Values
Constructor Detail

ConnectionStatus

public ConnectionStatus()
Method Detail

reset

protected void reset()

isConnected

public boolean isConnected()

isConnectionInProgress

public boolean isConnectionInProgress()

hasError

public boolean hasError()

getErrorCode

public int getErrorCode()

getErrorDescription

public java.lang.String getErrorDescription()

getStatus

public int getStatus()

getPeerName

public java.lang.String getPeerName()

isConfigured

protected boolean isConfigured()

isConnectedToNetPeerGroup

protected boolean isConnectedToNetPeerGroup()

setErrorDescription

protected void setErrorDescription(java.lang.String errorDescription)

setErrorCode

protected void setErrorCode(int errorCode)

setStatus

public void setStatus(int status)

setPeerName

protected void setPeerName(java.lang.String peerName)

setConfigured

protected void setConfigured(boolean configured)

setConnectedToNetPeerGroup

protected void setConnectedToNetPeerGroup(boolean connectedToNetPeerGroup)

addConnectionStatusListener

public void addConnectionStatusListener(ConnectionStatusListener connectionStatusListener)

removeConnectionStatusListener

public void removeConnectionStatusListener(ConnectionStatusListener connectionStatusListener)

fireConnectionStatusUpdated

protected void fireConnectionStatusUpdated()