summaryrefslogtreecommitdiff
path: root/trunk/TAO/examples/AMH/Sink_Server/AMH_Servant.h
blob: b71c32fe9df615d630ddd3be9d3063821a69645b (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
// -*- C++ -*-

// =========================================================================
/**
 *  @file  AMH_Servant.h
 *
 *  $Id$
 *
 *  @author Mayur Deshpande <mayur@ics.uci.edu>
 *
 */
// =========================================================================


#ifndef AMH_SERVANT_H
#define AMH_SERVANT_H

#include /**/ "ace/pre.h"
#include "tao/ORB_Core.h"

#include "TestS.h"

/// Implement the Rountrip interface
class AMH_Servant
  : public virtual POA_Test::AMH_Roundtrip
{
public:
  AMH_Servant (CORBA::ORB_ptr orb);

  virtual ~AMH_Servant (void);

  /// parse arguments from command line for sleep time
  virtual int parse_args (int& argc, char **argv);

  // = The skeleton methods
  virtual void start_test (Test::AMH_RoundtripResponseHandler_ptr _tao_rh
                           ACE_ENV_ARG_DECL_WITH_DEFAULTS)
    ACE_THROW_SPEC ((CORBA::SystemException));

  virtual void end_test (Test::AMH_RoundtripResponseHandler_ptr _tao_rh
                         ACE_ENV_ARG_DECL_WITH_DEFAULTS)
    ACE_THROW_SPEC ((CORBA::SystemException));

  virtual void test_method (Test::AMH_RoundtripResponseHandler_ptr _tao_rh,
                            Test::Timestamp send_time
                            ACE_ENV_ARG_DECL)
    ACE_THROW_SPEC ((CORBA::SystemException));

protected:
  ACE_Reactor *reactor_;
  int sleep_time_;
};

#include /**/ "ace/post.h"

#endif /* AMH_SERVANT_H */