Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   Compound Members  

GaiaES Class Reference

GaiaES - Gaia Event Service. More...

List of all members.

Public Types

typedef CosEventChannelAdmin::ProxyPushSupplier Channel
typedef Gaia::Events::EventManager::ChannelAlreadyExists ChannelAlreadyExists
typedef Gaia::Events::EventManager::ChannelNotFound ChannelNotFound
typedef Gaia::Events::EventManager::TypeAlreadyExists TypeAlreadyExists
typedef CosEventComm::Disconnected ChannelDisconnected
typedef CosEventChannelAdmin::AlreadyConnected AlreadyConnected

Static Public Methods

void refresh ()
 Create a new handle to the event service using the current space.

void sendEvent (const char *type, const char *name, const char *id, const GaiaAny &data, const char *space=NULL)
 Sends an event to the specified event channel.

GaiaES::Channel * addListener (const char *type, const char *name, GaiaES::Listener *listener, const char *space=NULL)
 Register a consumer of events.

void removeListener (GaiaES::Listener *listener)
 Unregister a consumer of events.

void removeListener (GaiaES::Channel *channel)
 Unregister a consumer of events.

void createType (const char *type, const char *space=NULL)
 Creates a new Event type if it does not already exists.

void createChannel (const char *type, const char *name, const char *space=NULL)
 Creates a new event channel.

void destroyChannel (const char *type, const char *name, const char *space=NULL)
 Destroys a particular event channel.


Friends

class Listener


Detailed Description

GaiaES - Gaia Event Service.

This class encapsulates the CORBA related functionalities of a sender or consumer of events. It exports methods for creating and deleting event channels, creating event types and sending events on a particular channel.

It also exports a defualt consumer class from which applications should inherit to receive events. The method registerConsumer can be used to register as a consumer to a particuler channel and unregisterConsumer to unregister from it.


Member Function Documentation

GaiaES::Channel* GaiaES::addListener const char *    type,
const char *    name,
GaiaES::Listener   listener,
const char *    space = NULL
[static]
 

Register a consumer of events.

The consumer's receiveEvent method will be called when a new event is generated.

Parameters:
name  name of the channel to which this consumer is to be registered
type  type of the channel to which this consumer is to be registered
consumer  the consumer that will receive events
space  name of the space; default to the current space
Returns:
handle to the event channel
Exceptions:
GaiaES::ChannelNotFound 
GaiaES::AlreadyConnected 
GaiaES::NotResolved 

void GaiaES::createChannel const char *    type,
const char *    name,
const char *    space = NULL
[static]
 

Creates a new event channel.

ams type type of the channel
ams name name of the channel
Parameters:
space  name of the space; default to the current space
Exceptions:
GaiaES::ChannelAlreadyExists 
GaiaES::ChannelNotFound 
GaiaES::NotResolved 

void GaiaES::createType const char *    type,
const char *    space = NULL
[static]
 

Creates a new Event type if it does not already exists.

Parameters:
type  the event type to be created
space  name of the space; default to the current space
Exceptions:
GaiaES::TypeAlreadyExists 
GaiaES::NotResolved 

void GaiaES::destroyChannel const char *    type,
const char *    name,
const char *    space = NULL
[static]
 

Destroys a particular event channel.

Parameters:
type  the type of the channel to be destroyed
name  the name of the channel to be destroyed
space  name of the space; default to the current space
Exceptions:
GaiaES::ChannelNotFound 
GaiaES::NotResolved 

void GaiaES::refresh   [static]
 

Create a new handle to the event service using the current space.

Exceptions:
GaiaES::NotResolved 

void GaiaES::removeListener GaiaES::Channel *    channel [static]
 

Unregister a consumer of events.

Parameters:
channel  the channel to remove the listener from
Exceptions:
GaiaES::ChannelNotFound 
GaiaES::AlreadyConnected 

void GaiaES::removeListener GaiaES::Listener   listener [static]
 

Unregister a consumer of events.

Parameters:
listener  the listener to remove from the channel it is attached to
Exceptions:
GaiaES::ChannelNotFound 
GaiaES::AlreadyConnected 

void GaiaES::sendEvent const char *    type,
const char *    name,
const char *    id,
const GaiaAny &    data,
const char *    space = NULL
[static]
 

Sends an event to the specified event channel.

Parameters:
type  type of the channel to which the event is to be sent
name  name of the channel to which the event is to be sent
id  application level id for processing the event; identifies the format of the event payload
data  payload of the event.
space  name of the space; default to the current space
Exceptions:
GaiaES::ChannelDisconnected 
GaiaES::NotResolved 


The documentation for this class was generated from the following file:
Generated on Wed Sep 18 18:10:51 2002 for Gaia by doxygen1.2.16