// **********************************************************************
//
// Copyright (c) 2002
// IONA Technologies, Inc.
// Waltham, MA, USA
//
// All Rights Reserved
//
// **********************************************************************

#ifndef OBTypedEventChannelFactory_idl
#define OBTypedEventChannelFactory_idl

#include <OB/CosTypedEventChannelAdmin.idl>
#include <OB/OBEventChannelFactory.idl>

#pragma prefix "ooc.com"

/**
  *
  * This module contains the interface for a
  * typed event channel factory object.
  *
  **/
module OBTypedEventChannelFactory
{ 

/**
  *
  * The interface for a typed event channel factory object, which
  * provides operations for the creation and retrieval of
  * typed event channels.
  *
  **/
interface TypedEventChannelFactory
{ 
    /**
      *
      * Creates and returns a typed event channel, which is a
      * persistent object reference.
      *
      * @param id The channel id identifying the new
      * typed event channel.
      *
      * @return The typed event channel.
      *
      * @exception ChannelAlreadyExists A typed event channel
      * identified by <code>id</code> already exists.
      *
      **/
    CosTypedEventChannelAdmin::TypedEventChannel create_channel(
        in OBEventChannelFactory::ChannelId id)
	raises(OBEventChannelFactory::ChannelAlreadyExists);

    /**
      *
      * Retrieves a typed event channel object, which is a persistent
      * object reference.
      *
      * @param id The channel id of the typed event channel to
      * retrieve.
      *
      * @return The typed event channel.
      *
      * @exception ChannelNotAvailable The requested
      * typed event channel identified by the <code>id</code> doesn't
      * exist.
      *
      **/
    CosTypedEventChannelAdmin::TypedEventChannel get_channel_by_id(
	in OBEventChannelFactory::ChannelId id)
        raises(OBEventChannelFactory::ChannelNotAvailable);

    /**
      *
      * Returns a sequence of channel ids identifying available
      * typed event channels.
      *
      * @return The sequence of channel ids.
      *
      **/
    OBEventChannelFactory::ChannelIdSeq get_channels();

    /**
      *
      * Shutdown the typed event service.
      *
      **/
    void shutdown();
};

};

#endif
