summaryrefslogtreecommitdiff
path: root/cpp/src/IceStorm/Instance.h
blob: ed9acca19ce3e969c2af559098183d10423fec10 (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
// **********************************************************************
//
// Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************

#ifndef INSTANCE_H
#define INSTANCE_H


#include <Ice/CommunicatorF.h>
#include <Ice/ObjectAdapterF.h>
#include <Ice/PropertiesF.h>
#include <IceUtil/Time.h>

namespace IceStorm
{

class BatchFlusher;
typedef IceUtil::Handle<BatchFlusher> BatchFlusherPtr;

class TraceLevels;
typedef IceUtil::Handle<TraceLevels> TraceLevelsPtr;

class SubscriberPool;
typedef IceUtil::Handle<SubscriberPool> SubscriberPoolPtr;

class Instance : public IceUtil::Shared
{
public:

    Instance(const std::string&, const Ice::CommunicatorPtr&, const Ice::ObjectAdapterPtr&);
    ~Instance();

    Ice::CommunicatorPtr communicator() const;
    Ice::PropertiesPtr properties() const;
    Ice::ObjectAdapterPtr objectAdapter() const;
    TraceLevelsPtr traceLevels() const;
    BatchFlusherPtr batchFlusher() const;
    SubscriberPoolPtr subscriberPool() const;

    IceUtil::Time discardInterval() const;
    int sendTimeout() const;

    void shutdown();

private:

    const Ice::CommunicatorPtr _communicator;
    const Ice::ObjectAdapterPtr _adapter;
    const TraceLevelsPtr _traceLevels;
    const IceUtil::Time _discardInterval;
    const int _sendTimeout;
    BatchFlusherPtr _batchFlusher;
    SubscriberPoolPtr _subscriberPool;
};
typedef IceUtil::Handle<Instance> InstancePtr;

} // End namespace IceStorm

#endif