00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef ReplicaLocationIndexImpl_H
00013 #define ReplicaLocationIndexImpl_H 1
00014
00015 #include <string>
00016 #include <vector>
00017 #include <memory>
00018 #include <iostream>
00019
00020 #include "EdgReplicaLocationIndex/ReplicaLocationIndex.h"
00021 #include "EdgReplicaLocationIndex/ReplicationExceptions.h"
00022 #include "edg_gsoap_baseH.h"
00023
00024 namespace EdgReplicaLocationIndex
00025 {
00033 class ReplicaLocationIndexImpl : public ReplicaLocationIndex {
00034
00035 public:
00036
00037
00038
00039
00040
00041 ReplicaLocationIndexImpl(const std::string& url);
00042
00043 #ifdef WITH_WP2_SECURITY
00044 ReplicaLocationIndexImpl(const std::string& url,
00045 char *passphrase,
00046 char *credentials,
00047 char *cacertdir,
00048 char *rseedfile);
00049
00050 ReplicaLocationIndexImpl(const std::string& url,
00051 char *passphrase,
00052 char *credentials,
00053 char *cacertdir,
00054 char *rseedfile,
00055 char *role,
00056 char *policy,
00057 char *defaultRole,
00058 char *defaultPolicy);
00059 #endif
00060
00061 virtual ~ReplicaLocationIndexImpl();
00062
00063 const std::string getUrl() const;
00064
00072 virtual void getLRC(const std::string& guid, LRCs& toFill ) const
00073 throw(CommunicationException);
00074
00080 virtual void lrcList(LRCs& toFill) const
00081 throw(CommunicationException);
00082
00089 virtual bool exists(const std::string& guid) const
00090 throw(CommunicationException);
00091
00099 virtual bool existsAt(const std::string& lrc,
00100 const std::string& guid) const
00101 throw(CommunicationException);
00102
00103
00104
00105
00106
00118 virtual void update(const std::string& lrcEndpoint,
00119 long expiration,
00120 const Bytes& bits,
00121 int entries,
00122 int numBits,
00123 int optimalNumKeys,
00124 int numHashes)
00125 throw(CommunicationException);
00126
00133 virtual bool remove(const std::string& lrcEndpoint)
00134 throw(CommunicationException);
00135
00136
00137
00138
00139
00146 virtual const std::string ping() const
00147 throw(CommunicationException);
00148
00152 virtual const std::string getVersion() const
00153 throw(CommunicationException);
00154
00158 virtual const std::string getInterfaceVersion() const
00159 throw(CommunicationException);
00160
00161 private:
00162
00163
00164
00165
00166
00167 void
00168 dump_soap(int ret, const struct soap* soap) const;
00169
00170 void
00171 dump_soap_error(int ret, const struct soap* const_soap) const;
00172
00173 void
00174 handleGenericFaults(int ret, const struct soap* soap) const;
00175
00176 const char*
00177 endpoint() const;
00178
00179 struct soap*
00180 soap() const;
00181
00182
00183
00184
00185 const std::string m_endpoint;
00186 struct soap* m_soap;
00187 };
00188 }
00189
00190
00191 #endif // ReplicaLocationIndexImpl_H
00192
00193
00194