OmniEvents
EventChannelFactory.h
Go to the documentation of this file.
1// -*- Mode: C++; -*-
2// Package : omniEvents
3// EventChannelFactory_i.h Created : 1/4/98
4// Author : Paul Nader (pwn)
5//
6// Copyright (C) 1998 Paul Nader, 2004-2005 Alex Tingle.
7//
8// This file is part of the omniEvents application.
9//
10// omniEvents is free software; you can redistribute it and/or
11// modify it under the terms of the GNU Lesser General Public
12// License as published by the Free Software Foundation; either
13// version 2.1 of the License, or (at your option) any later version.
14//
15// omniEvents is distributed in the hope that it will be useful,
16// but WITHOUT ANY WARRANTY; without even the implied warranty of
17// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18// Lesser General Public License for more details.
19//
20// You should have received a copy of the GNU Lesser General Public
21// License along with this library; if not, write to the Free Software
22// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23//
24
25#ifndef OMNIEVENTS_EVENTCHANNELFACTORY_H
26#define OMNIEVENTS_EVENTCHANNELFACTORY_H
27
28#ifdef HAVE_CONFIG_H
29# include "config.h"
30#endif
31
32#ifdef HAVE_IOSTREAM
33# include <iostream>
34#else
35# include <iostream.h>
36#endif
37
38#include "omniEvents.hh"
39#include "Servant.h"
40#include "EventChannel.h"
41
42#ifdef HAVE_STD_STL
43using namespace std;
44#endif
45
46namespace OmniEvents {
47
48class PersistNode;
49
50// Event Channel Factory
51
53 public virtual POA_omniEvents::EventChannelFactory,
54 public PortableServer::RefCountServantBase,
55 public Servant
56{
57public: // CORBA METHODS
63 CORBA::Boolean supports(const CosLifeCycle::Key& k);
64 CORBA::Object_ptr create_object(
65 const CosLifeCycle::Key &k,
66 const CosLifeCycle::Criteria &the_criteria
67 );
68
70 CORBA::Boolean is_alive() { return 1; }
71
73 CosEventChannelAdmin::EventChannel_ptr create_channel(
74 const char* channel_name
75 );
76
78 CosEventChannelAdmin::EventChannel_ptr join_channel(
79 const char* channel_name
80 );
81
82
83public:
86 virtual ~EventChannelFactory_i();
87
91 PersistNode* parseCriteria(const CosLifeCycle::Criteria& criteria) const;
92
96 CosLifeCycle::Criteria extract(
97 const char* name,
98 const CosLifeCycle::Criteria& from
99 ) const;
100
101 void output(ostream& os);
102
103private:
107 unsigned int _port;
108
113
115};
116
117}; // namespace OmniEvents
118
119#endif // OMNIEVENTS_EVENTCHANNELFACTORY_H
Container for Event Channels.
CosLifeCycle::Criteria extract(const char *name, const CosLifeCycle::Criteria &from) const
Utility function: constructs a Criteria that contains a single criterion.
CORBA::Object_ptr create_object(const CosLifeCycle::Key &k, const CosLifeCycle::Criteria &the_criteria)
string _endPointNoListen
Stores the value of the endPointNoListen ORB parameter.
CORBA::Boolean supports(const CosLifeCycle::Key &k)
Returns true if the key passed has the following contents:
CORBA::Boolean is_alive()
'ping' method inherited from FT::PullMonitorable.
CosEventChannelAdmin::EventChannel_ptr create_channel(const char *channel_name)
DO NOT USE.
PersistNode * parseCriteria(const CosLifeCycle::Criteria &criteria) const
Convert CosLifeCycle::Criteria into a PersistNode.
CosEventChannelAdmin::EventChannel_ptr join_channel(const char *channel_name)
DO NOT USE.
unsigned int _port
The EventChannelFactory listens on this TCP port.
Base class for servants.
Definition Servant.h:114