~ubuntu-branches/ubuntu/saucy/resiprocate/saucy-proposed

« back to all changes in this revision

Viewing changes to repro/monkeys/QValueTargetHandler.hxx

  • Committer: Package Import Robot
  • Author(s): Daniel Pocock
  • Date: 2012-05-17 19:29:59 UTC
  • Revision ID: package-import@ubuntu.com-20120517192959-vv00m77isztdy64q
Tags: upstream-1.8.2
ImportĀ upstreamĀ versionĀ 1.8.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef Q_VALUE_TARGET_HANDLER_HXX
 
2
#define Q_VALUE_TARGET_HANDLER_HXX 1
 
3
 
 
4
#include "repro/Processor.hxx"
 
5
#include "repro/ResponseContext.hxx"
 
6
#include "repro/ProxyConfig.hxx"
 
7
 
 
8
#include "rutil/Data.hxx"
 
9
#include <vector>
 
10
 
 
11
namespace repro
 
12
{
 
13
 
 
14
class RequestContext;
 
15
 
 
16
class QValueTargetHandler : public Processor
 
17
{
 
18
   public:
 
19
 
 
20
      typedef enum
 
21
      {
 
22
         FULL_SEQUENTIAL,
 
23
         EQUAL_Q_PARALLEL,
 
24
         FULL_PARALLEL
 
25
      } ForkBehavior;
 
26
 
 
27
      QValueTargetHandler(ProxyConfig& config);
 
28
      virtual ~QValueTargetHandler();
 
29
      
 
30
      virtual processor_action_t process(RequestContext &);
 
31
 
 
32
      void fillNextTargetGroup(std::vector<resip::Data>& fillHere,
 
33
                              const std::list<resip::Data>& queue,
 
34
                              const ResponseContext& rsp) const;
 
35
                           
 
36
      virtual bool isMyType( Target* target) const;
 
37
      
 
38
      virtual void removeTerminated(std::list<resip::Data>& queue,
 
39
                                    const ResponseContext& rsp) const;
 
40
   
 
41
   protected:
 
42
      ForkBehavior mForkBehavior;
 
43
      bool mCancelBetweenForkGroups;
 
44
      bool mWaitForTerminate;
 
45
      int mDelayBetweenForkGroups;
 
46
      int mCancellationDelay;
 
47
};
 
48
 
 
49
}
 
50
 
 
51
#endif
 
52
 
 
53
/* ====================================================================
 
54
 * The Vovida Software License, Version 1.0 
 
55
 * 
 
56
 * Copyright (c) 2000 Vovida Networks, Inc.  All rights reserved.
 
57
 * 
 
58
 * Redistribution and use in source and binary forms, with or without
 
59
 * modification, are permitted provided that the following conditions
 
60
 * are met:
 
61
 * 
 
62
 * 1. Redistributions of source code must retain the above copyright
 
63
 *    notice, this list of conditions and the following disclaimer.
 
64
 * 
 
65
 * 2. Redistributions in binary form must reproduce the above copyright
 
66
 *    notice, this list of conditions and the following disclaimer in
 
67
 *    the documentation and/or other materials provided with the
 
68
 *    distribution.
 
69
 * 
 
70
 * 3. The names "VOCAL", "Vovida Open Communication Application Library",
 
71
 *    and "Vovida Open Communication Application Library (VOCAL)" must
 
72
 *    not be used to endorse or promote products derived from this
 
73
 *    software without prior written permission. For written
 
74
 *    permission, please contact vocal@vovida.org.
 
75
 *
 
76
 * 4. Products derived from this software may not be called "VOCAL", nor
 
77
 *    may "VOCAL" appear in their name, without prior written
 
78
 *    permission of Vovida Networks, Inc.
 
79
 * 
 
80
 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
 
81
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 
82
 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
 
83
 * NON-INFRINGEMENT ARE DISCLAIMED.  IN NO EVENT SHALL VOVIDA
 
84
 * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
 
85
 * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
 
86
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 
87
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 
88
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
 
89
 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 
90
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
 
91
 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
 
92
 * DAMAGE.
 
93
 * 
 
94
 * ====================================================================
 
95
 */