summaryrefslogtreecommitdiff
path: root/TAO/examples/Quoter/Quoter.idl
blob: 59ed3407b90be00f15a525508c9dace78f010faf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128

//=============================================================================
/**
 *  @file    Quoter.idl
 *
 *  Quoter example that illustrate the use of the global POA and
 *  the CosLifeCycle service.
 *
 *
 *  @author Darrell Brunsch (brunsch@cs.wustl.edu) Michael Kircher (mk1@cs.wustl.edu)
 */
//=============================================================================


#include "orbsvcs/CosLifeCycle.idl"

module Stock
{
  exception Invalid_Stock {};
  exception Invalid_Quoter {};

  interface Quoter : CosLifeCycle::LifeCycleObject
    {
      // = TITLE
      //   Access Stock information.

      // Returns the current stock value or throws an exception.
      long get_quote (in string stock_name)
        raises (Invalid_Stock, Invalid_Quoter);

      // LifeCycleObject copy(in FactoryFinder there,
      //                      in Criteria the_criteria)
      //    raises(NoFactory, NotCopyable, InvalidCriteria, CannotMeetCriteria);
      // copies this object to a location "there" using the "the_criteria"

      // void move(in FactoryFinder there,
      //     in Criteria the_criteria)
      //     raises(NoFactory, NotMovable, InvalidCriteria,  CannotMeetCriteria);
      // moves this object to a location "there" using the "the_criteria"

      // void remove()
      //     raises(NotRemovable);
      // removes/deletes this object

    };

  interface Quoter_Factory
    {
      // = TITLE
      //   Creation of Quoter objects

      Quoter create_quoter (in string name)
        raises (Invalid_Quoter);
      // Returns a new Quoter selected by name e.g., "Dow Jones,"
      // "Reuters,", etc
    };

  interface Quoter_Factory_Finder : CosLifeCycle::FactoryFinder
    {
      // = TITLE
      //   Wrapper for the CosLifeCycle FactoryFinder
      //
      // inherits:
      // Factories find_factories(in Key factory_key) raises(NoFactory);
    };

  interface Quoter_Generic_Factory : CosLifeCycle::GenericFactory
    {
      // = TITLE
      //   Wrapper for the CosLifeCycle GenericFactory
      //
      // inherits:
      // boolean supports(in Key k);
      // Object create_object(in Key k, in Criteria the_criteria)
      //      raises (NoFactory, InvalidCriteria, CannotMeetCriteria);
    };

  interface Quoter_Life_Cycle_Service : CosLifeCycle::GenericFactory
    {
      // = TITLE
      //   Wrapper for the CosLifeCycle GenericFactory
      //
      // inherits:
      // boolean supports(in Key k);
      // Object create_object(in Key k, in Criteria the_criteria)
      //      raises (NoFactory, InvalidCriteria, CannotMeetCriteria);

      void register_factory (in string name,
                             in string location,
                             in string description,
                             in Object _object);
      // provide an method for registering factories with their properties
    };

  interface Criteria_Evaluator
    {
      // = TITLE
      //   Criteria Evaluator
      //
      // = DESCRIPTION
      //   Interface description for an evaluator of CosLifeCycle
      //   Criterias. It is mainly a wrapper, which should make
      //   access easier
      //
      typedef sequence <CosLifeCycle::NameValuePair> SeqNamedValuePair;

      typedef CosLifeCycle::Criteria Criteria;

      exception NotAvailable { string reason; };
      // raised if the questioned configuration is not available

      SeqNamedValuePair getInitialization ();
      // get the initialization

      string getFilter ();
      // get a filter string

      SeqNamedValuePair getLogicalLocation ();
      // get the logical location

      string getPreferences ();
      // get the preferences, not implemented

      void setCriteria (in Criteria criteria_);
      // set the Criteria which is searched for keywords
    };
};