it.list.jft.event
Interface FilterListener

All Superinterfaces:
Listener

public interface FilterListener
extends Listener

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

onFilterCreate

void onFilterCreate(FilterCreateEvent event)
Called when the server-answer to the Filter.create() is available.

If the server result is Event.RESULT_OK,
then

otherwise

In the latter case it is a good practice to release the filter associated to the event parameter.

Parameters:
event - the server-answer to the Filter.create()

onFilterSet

void onFilterSet(FilterSetEvent event)
Called when the server-answer to the 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:

  • the filter status remains unchanged (the most of cases it remains Filter.STATUS_CREATED).
  • the server may now accept subscriptions based on this filter.

    Parameters:
    event - the server-answer to the Filter.set(java.lang.String)

  • onFilterDestroy

    void onFilterDestroy(FilterDestroyEvent event)
    Called when the server-answer to the 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:

    Parameters:
    event - the server-answer to the Filter.destroy()


    Submit a bug or feature to FT\API Programming Support<\font>