public interface FilterListener
Interface to be implemented in order to handle the Filter Lifecycle.
This interface is bound to filters created by
Context.makeFilter()
.
It may be retrieved by CommunicationLifeCycle.getListener()
.
Method Summary | |
---|---|
void |
onFilterCreate(FilterCreateEvent event)
Called when the server-answer to the Filter.create() is
available. |
void |
onFilterDestroy(FilterDestroyEvent event)
Called when the server-answer to the Filter.destroy()
is available. |
void |
onFilterSet(FilterSetEvent event)
Called when the server-answer to the Filter.set(java.lang.String) is
available. |
Method Detail |
---|
void onFilterCreate(FilterCreateEvent event)
Filter.create()
is
available.
If the server result is
Event.RESULT_OK
,
then
Filter.STATUS_CREATED
.
Filter.set(java.lang.String)
on this
filter.
otherwise
Filter.STATUS_DESTROYED
.
Filter.set(java.lang.String)
on
this filter.
In the latter case it is a good practice to
release
the
filter associated to the event
parameter.
event
- the server-answer to the Filter.create()
void onFilterSet(FilterSetEvent event)
Filter.set(java.lang.String)
is
available.
If the server result is
Event.RESULT_OK
then the server has accepted the filter setting
otherwise some error occurred (see the various FilterSetEvent
result codes to understand why).
In both cases:
Filter.STATUS_CREATED
).
event
- the server-answer to the Filter.set(java.lang.String)
void onFilterDestroy(FilterDestroyEvent event)
Filter.destroy()
is available.
If the server result is
Event.RESULT_OK
, then the server has destroyed the filter
otherwise some unknow error occured.
In both cases:
Filter.STATUS_DESTROYED
.
release
the
filter associated to the event
parameter.
event
- the server-answer to the Filter.destroy()