summaryrefslogtreecommitdiff
path: root/apps/Gateway/Gateway/Config_Files.h
blob: 2620301e25bc104fc985cec67af806539ab79017 (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
/* -*- C++ -*- */
// $Id$

// ============================================================================
//
// = LIBRARY
//    apps
// 
// = FILENAME
//    Config_Files.h
//
// = AUTHOR
//    Doug Schmidt 
// 
// ============================================================================

#if !defined (_CONFIG_FILES)
#define _CONFIG_FILES

#include "ace/OS.h"
#include "File_Parser.h"

class Connection_Config_File_Entry
  // = TITLE
  //     Stores the Proxy_Handler entry for connection configuration.
{
public:
  int conn_id_;
  // Connection id for this Proxy_Handler.

  char host_[BUFSIZ];
  // Host to connect with.

  u_short remote_poconsumer_;
  // Port to connect with.

  char direction_;
  // 'S' (supplier) or 'C' (consumer).

  int max_retry_delay_;
  // Maximum amount of time to wait for reconnecting.
  
  u_short local_poconsumer_;
  // Our local port number.
};

class Connection_Config_File_Parser : public File_Parser<Connection_Config_File_Entry>
  // = TITLE
  //     Parser for the Proxy_Handler Connection file.
{
public:
  virtual FP::Return_Type
    read_entry (Connection_Config_File_Entry &entry, int &line_number);
};

class Consumer_Config_File_Entry
  // = TITLE
  //     Stores the information in a Consumer Map entry.
{
public:
  enum {
    MAX_DESTINATIONS = 1000 // Total number of multicast destinations.
  };

  int conn_id_;
  // Connection id for this channel.

  int supplier_id_;
  // Logical routing id for this channel.
  
  int type_;
  // Type of payload in the message.

  int destinations_[MAX_DESTINATIONS];
  // Connection ids for destinations that we're routing to.
  
  int total_destinations_;
  // Total number of these destinations.
};  

class Consumer_Config_File_Parser : public File_Parser<Consumer_Config_File_Entry>
  // = TITLE
  //     Parser for the Consumer Map file.
{
public:
  virtual FP::Return_Type
    read_entry (Consumer_Config_File_Entry &entry, int &line_number);
};

#endif /* _CONFIG_FILES */