public class NetworkContact
extends java.lang.Object
implements android.os.Parcelable
Modifier and Type | Class and Description |
---|---|
static interface |
NetworkContact.EventListener |
static class |
NetworkContact.UpdateStatus |
Modifier and Type | Field and Description |
---|---|
static android.os.Parcelable.Creator<NetworkContact> |
CREATOR |
static java.lang.String |
TAG |
Constructor and Description |
---|
NetworkContact(java.lang.String vmfParticipantID,
java.lang.String callsign) |
NetworkContact(java.lang.String uid,
java.lang.String callsign,
java.lang.String team,
java.lang.String role,
NetConnectString endpoint) |
Modifier and Type | Method and Description |
---|---|
void |
addListener(NetworkContact.EventListener l) |
int |
describeContents() |
void |
die() |
boolean |
equals(NetworkContact c) |
boolean |
equals(java.lang.Object o) |
java.lang.String |
getCallsign() |
NetConnectString |
getConnectString() |
long |
getLastRefresh() |
java.lang.String |
getRole() |
NetworkContact.UpdateStatus |
getStatus() |
java.lang.String |
getTeam() |
java.lang.String |
getUID() |
int |
getVersion() |
int |
hashCode() |
boolean |
isVMFContact() |
void |
refresh(long time) |
void |
removeListener(NetworkContact.EventListener l) |
void |
setCallsign(java.lang.String callsign)
In case some scheme ever arises where the callsign can change w/o changing the actual
contact.
|
void |
setConnectString(NetConnectString connectString) |
void |
setRole(java.lang.String role) |
void |
setTeam(java.lang.String team) |
void |
setUID(java.lang.String uid)
XXX - not sure why the uid is being used over group name, but when a group contact changes we
need to set this.
|
void |
setVersion(int v) |
void |
stale()
Equivalent to calling
stale(false, 0) |
void |
stale(boolean startTimer,
long delay)
Optionally starts a timer that automatically calls
die() if no updates come from
this contact. |
java.lang.String |
toString() |
void |
writeToParcel(android.os.Parcel dest,
int flags) |
public static final java.lang.String TAG
public static final android.os.Parcelable.Creator<NetworkContact> CREATOR
public NetworkContact(java.lang.String uid, java.lang.String callsign, java.lang.String team, java.lang.String role, NetConnectString endpoint)
public NetworkContact(java.lang.String vmfParticipantID, java.lang.String callsign)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getUID()
public java.lang.String getCallsign()
public java.lang.String getTeam()
public java.lang.String getRole()
public int getVersion()
public void setTeam(java.lang.String team)
public void setRole(java.lang.String role)
public void setVersion(int v)
public void setUID(java.lang.String uid)
public void setCallsign(java.lang.String callsign)
callsign
- the callsignpublic NetConnectString getConnectString()
public void setConnectString(NetConnectString connectString)
public long getLastRefresh()
public NetworkContact.UpdateStatus getStatus()
public boolean isVMFContact()
public void refresh(long time)
public void stale()
stale(false, 0)
public void stale(boolean startTimer, long delay)
die()
if no updates come from
this contact. The timer will fire after delay
milliseconds.startTimer
- if true, then then once the delay elapses, the timer calls die()delay
- if startTimer
is false has no relevancepublic void die()
public void addListener(NetworkContact.EventListener l)
public void removeListener(NetworkContact.EventListener l)
public int describeContents()
describeContents
in interface android.os.Parcelable
public void writeToParcel(android.os.Parcel dest, int flags)
writeToParcel
in interface android.os.Parcelable
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public boolean equals(NetworkContact c)