org.sakaiproject.courier.api
Interface CourierService


public interface CourierService

CourierService is the Interface for a Sakai service which can be used to push messages from the Sakai server components to the user interface in the browser.
It is used mostly to cause a tool in a particular portal instance to be refreshed to respond to a change noticed at the server.

An Address identifies a particular client's window: it merges the Usage session, the window's portal page location, and perhaps the tool id (for floating tool windows).

A Delivery object captures the Address, the HTML Element Id involved, and any other details of a particular type of delivery.


Field Summary
static String SERVICE_NAME
          This string can be used to find the service in the service manager.
 
Method Summary
 void clear(String address)
          Clear any pending delivery requests to this session client window.
 void clear(String address, String elementId)
          Clear any pending delivery requests to the particular client window for this element.
 void deliver(Delivery delivery)
          Queue up a delivery for the client window identified in the Delivery object.
 List getDeliveries(String address)
          Access and de-queue the Deliveries queued up for a particular session client window.
 List<DeliveryProvider> getDeliveryProviders()
          Access a list of DeliveryProviders registered with the CourierService.
 boolean hasDeliveries(String address)
          Check to see if there are any deliveries queued up for a particular session client window.
 void registerDeliveryProvider(DeliveryProvider provider)
          Register a DeliveryProvider with the CourierService.
 

Field Detail

SERVICE_NAME

static final String SERVICE_NAME
This string can be used to find the service in the service manager.

Method Detail

deliver

void deliver(Delivery delivery)
Queue up a delivery for the client window identified in the Delivery object. The particular form of delivery is determined by the type of Delivery object sent.

Parameters:
delivery - The Delivery (or extension) object to deliver.

clear

void clear(String address,
           String elementId)
Clear any pending delivery requests to the particular client window for this element.

Parameters:
address - The address of the client window.
elementId - The id of the html element.

clear

void clear(String address)
Clear any pending delivery requests to this session client window.

Parameters:
address - The address of client window.

getDeliveries

List getDeliveries(String address)
Access and de-queue the Deliveries queued up for a particular session client window.

Parameters:
address - The address of client window.
Returns:
a List of Delivery objects addressed to this session client window.

hasDeliveries

boolean hasDeliveries(String address)
Check to see if there are any deliveries queued up for a particular session client window.

Parameters:
address - The address of the client window.
Returns:
true if there are deliveries for this client window, false if not.

getDeliveryProviders

List<DeliveryProvider> getDeliveryProviders()
Access a list of DeliveryProviders registered with the CourierService.

Returns:
A list of DeliveryProviders or null, if no DeliveryProviders are registered with the CourierService

registerDeliveryProvider

void registerDeliveryProvider(DeliveryProvider provider)
Register a DeliveryProvider with the CourierService.

Parameters:
provider -


Copyright © 2003-2012 The Sakai Foundation. All Rights Reserved.