Errai 3.0.1-SNAPSHOT

org.jboss.errai.bus.client.api.laundry
Interface LaundryList

All Known Implementing Classes:
ServerLaundryList

public interface LaundryList

A collection of tasks that should be performed when a particular session has ended.

Example code for adding a task to a session's laundry list:

 Message message = ...;
 Object sessionResource = message.getResource(Object.class, "Session");
 final LaundryReclaim reclaim =
         LaundryListProviderFactory.get()
             .getLaundryList(sessionResource)
             .add(new Laundry() {
               @Override
               public void clean() {
                 task.cancel(true);
               }
         });
 

Author:
Mike Brock, Jonathan Fuerth , Christian Sadilek

Method Summary
 LaundryReclaim add(Laundry laundry)
          Adds a task.
 boolean remove(Laundry laundry)
          Removes a task.
 

Method Detail

add

LaundryReclaim add(Laundry laundry)
Adds a task.

Parameters:
laundry - The task to run. Cannot be null.
Returns:
A handle on the task that can be used to run the task early (before the session has ended).

remove

boolean remove(Laundry laundry)
Removes a task.

Parameters:
laundry - The task to remove.
Returns:
true if removed, otherwise false.

Errai 3.0.1-SNAPSHOT

Copyright © 2013-2014 JBoss, a division of Red Hat. All Rights Reserved.