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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
|
// **********************************************************************
//
// Copyright (c) 2003-2017 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 ICE_WS_ENDPOINT_I_H
#define ICE_WS_ENDPOINT_I_H
#include <Ice/EndpointI.h>
#include <Ice/IPEndpointIF.h>
#include <Ice/EndpointFactory.h>
#include <Ice/InstanceF.h>
#include <Ice/Endpoint.h>
#include <Ice/ProtocolInstance.h>
namespace IceInternal
{
//
// Delegate interface implemented by TcpEndpoint or IceSSL::Endpoint or any endpoint that WS can
// delegate to.
//
class ICE_API WSEndpointDelegate : virtual public IceUtil::Shared
{
public:
virtual Ice::EndpointInfoPtr getWSInfo(const std::string&) const = 0;
};
class WSEndpoint : public EndpointI
{
public:
WSEndpoint(const ProtocolInstancePtr&, const EndpointIPtr&, const std::string&);
WSEndpoint(const ProtocolInstancePtr&, const EndpointIPtr&, std::vector<std::string>&);
WSEndpoint(const ProtocolInstancePtr&, const EndpointIPtr&, BasicStream*);
virtual Ice::EndpointInfoPtr getInfo() const;
virtual Ice::Short type() const;
virtual const std::string& protocol() const;
virtual void streamWrite(BasicStream*) const;
virtual Ice::Int timeout() const;
virtual EndpointIPtr timeout(Ice::Int) const;
virtual const std::string& connectionId() const;
virtual EndpointIPtr connectionId(const ::std::string&) const;
virtual bool compress() const;
virtual EndpointIPtr compress(bool) const;
virtual bool datagram() const;
virtual bool secure() const;
virtual TransceiverPtr transceiver() const;
virtual void connectors_async(Ice::EndpointSelectionType, const EndpointI_connectorsPtr&) const;
virtual AcceptorPtr acceptor(const std::string&) const;
virtual std::vector<EndpointIPtr> expand() const;
virtual bool equivalent(const EndpointIPtr&) const;
virtual ::Ice::Int hash() const;
virtual std::string options() const;
EndpointIPtr delegate() const;
WSEndpointPtr endpoint(const EndpointIPtr&) const;
virtual bool operator==(const Ice::LocalObject&) const;
virtual bool operator<(const Ice::LocalObject&) const;
protected:
virtual bool checkOption(const std::string&, const std::string&, const std::string&);
private:
//
// All members are const, because endpoints are immutable.
//
const ProtocolInstancePtr _instance;
const IPEndpointIPtr _delegate;
const std::string _resource;
};
class ICE_API WSEndpointFactory : public EndpointFactory
{
public:
WSEndpointFactory(const ProtocolInstancePtr&, const EndpointFactoryPtr&);
virtual ~WSEndpointFactory();
virtual Ice::Short type() const;
virtual std::string protocol() const;
virtual EndpointIPtr create(std::vector<std::string>&, bool) const;
virtual EndpointIPtr read(BasicStream*) const;
virtual void destroy();
virtual EndpointFactoryPtr clone(const ProtocolInstancePtr&) const;
private:
ProtocolInstancePtr _instance;
const EndpointFactoryPtr _delegate;
};
}
#endif
|