|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.unclouded.android.ServiceListener<T>
T
- the type of data that is expected when discovering a service.public abstract class ServiceListener<T>
Monitors the state of one or more services.
A ServiceListener
is passed as argument to the
when
or
whenever
method on
the Unclouded
event loop. It triggers notifications in three cases:
isDiscovered(Object)
is triggered
when the service is discovered for the first time.isDisconnected(Object)
is triggered
when the service is disconnected from the network.isReconnected(Object)
is triggered
when the service is reconnected to the network.Note that only isDiscovered(Object)
is required to be implemented.
Both isDisconnected(Object)
and isReconnected(Object)
are optional.
Constructor Summary | |
---|---|
ServiceListener()
|
Method Summary | |
---|---|
void |
isDisconnected(T value)
Triggered when the service is disconnected from the network. |
abstract void |
isDiscovered(T value)
Triggered when the service is discovered in the network for the first time. |
void |
isReconnected(T value)
Triggered when the service is reconnected to the network. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ServiceListener()
Method Detail |
---|
public abstract void isDiscovered(T value)
value
- the value or RemoteReference
hold by the service.public void isDisconnected(T value)
value
- the value or RemoteReference
hold by the service.public void isReconnected(T value)
value
- the value or RemoteReference
hold by the service.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |