File: HTTP_Service_Handler.h

package info (click to toggle)
ace 6.0.3%2Bdfsg-0.1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 49,368 kB
  • sloc: cpp: 341,826; perl: 30,850; ansic: 20,952; makefile: 10,144; sh: 4,744; python: 828; exp: 787; yacc: 511; xml: 330; lex: 158; lisp: 116; csh: 48; tcl: 5
file content (65 lines) | stat: -rw-r--r-- 1,524 bytes parent folder | download | duplicates (2)
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
/* -*- c++ -*- */
// $Id: HTTP_Service_Handler.h 91863 2010-09-20 13:33:11Z johnnyw $

#ifndef JAWS_HTTP_SERVICE_HANDLER_H
#define JAWS_HTTP_SERVICE_HANDLER_H

#include "ace/Synch.h"
#include "ace/Acceptor.h"
#include "ace/Svc_Handler.h"
#include "ace/SOCK_Acceptor.h"

#include "jaws3/Protocol_Handler.h"

#include "HTTP_Data.h"

class JAWS_HTTP_Service_Handler
  : public ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH>
  , public JAWS_Protocol_Handler
// = TITLE
//     An HTTP Server service handler.
//
// = DESCRIPTION
//     This class is responsible for initializing the JAWS_Protocol_Handler
//     with the correct state and data so that the HTTP Server can
//     be properly serviced by the underlying framework.
//
//     This class should perhaps be factored out into a template so that
//     there is less programming effort.
{
public:

  JAWS_HTTP_Service_Handler (void);

  int open (void *);

  int close (unsigned long);

private:

  JAWS_HTTP_Data data_;

};


class ACE_Svc_Export JAWS_HTTP_Acceptor
  : public ACE_Acceptor<JAWS_HTTP_Service_Handler, ACE_SOCK_ACCEPTOR>
// = TITLE
//     An HTTP Server acceptor.
//
// = DESCRIPTION
//     The role of this class is to serve the acceptor role in the
//     acceptor pattern.  It interacts with the Reactor to perform
//     accepts asynchronously.  Upon completion, the service handler
//     is created.
{
public:

  int init (int argc, ACE_TCHAR *argv[]);

};

ACE_SVC_FACTORY_DECLARE (JAWS_HTTP_Acceptor)


#endif /* JAWS_HTTP_SERVICE_HANDLER_H */