00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef GRID_CLIENT_PROTOCOL_CONFIGURATION_HPP_INCLUDED
00011 #define GRID_CLIENT_PROTOCOL_CONFIGURATION_HPP_INCLUDED
00012
00013 #include <string>
00014
00015 #include <gridgain/gridconf.hpp>
00016 #include <gridgain/gridclientuuid.hpp>
00017 #include <gridgain/gridclientprotocol.hpp>
00018
00022 class GRIDGAIN_API GridClientProtocolConfiguration {
00023 public:
00025 static const GridClientProtocol DFLT_CLIENT_PROTOCOL = TCP;
00026
00028 static const long DFLT_MAX_CONN_TIMEOUT = 20000L;
00029
00031 static const long DFLT_MAX_CONN_IDLE_TIME = 30000L;
00032
00034 static const int DFLT_TCP_PORT = 11211;
00035
00037 static const int DFLT_HTTP_PORT = 8080;
00038
00040 GridClientProtocolConfiguration();
00041
00047 GridClientProtocolConfiguration(const GridClientProtocolConfiguration& other);
00048
00055 GridClientProtocolConfiguration& operator=(const GridClientProtocolConfiguration& rhs);
00056
00058 virtual ~GridClientProtocolConfiguration();
00059
00065 GridClientProtocol protocol() const;
00066
00072 void protocol(GridClientProtocol p);
00073
00079 int connectTimeout() const;
00080
00086 void connectTimeout(int t);
00087
00094 bool sslEnabled() const;
00095
00102 void sslEnabled(bool ssl);
00103
00110 std::string certificateFilePath() const;
00111
00118 void certificateFilePath(const std::string& cert);
00119
00125 std::string certificateFilePassword() const;
00126
00132 void certificateFilePassword(const std::string& pass);
00133
00137 GridClientUuid uuid() const;
00138
00144 std::string credentials() const;
00145
00151 void credentials(const std::string& cred);
00152
00158 long maxConnectionIdleTime() const;
00159
00165 void maxConnectionIdleTime(long maxTime);
00166
00167 private:
00168 class Impl;
00169 Impl* pimpl;
00170 };
00171
00172 #endif