include/infinispan/hotrod/exceptions.h

Go to the documentation of this file.
00001 #ifndef ISPN_HOTROD_EXCEPTIONS_H
00002 #define ISPN_HOTROD_EXCEPTIONS_H
00003 
00004 #include <exception>
00005 #include <string>
00006 #include <stdint.h>
00007 #include "infinispan/hotrod/ImportExport.h"
00008 
00009 namespace infinispan {
00010 namespace hotrod {
00011 
00012 class HR_EXTERN Exception : public std::exception
00013 {
00014   public:
00015     explicit Exception(const std::string& message=std::string()) throw();
00016     virtual ~Exception() throw();
00017     virtual const char* what() const throw();
00018 
00019   private:
00020     std::string message;
00021 };
00022 
00027 class HR_EXTERN HotRodClientException : public std::exception
00028 {
00029   public:
00030     explicit HotRodClientException(const std::string&);
00031     HotRodClientException(const std::string& message_, uint64_t message_id_, uint8_t status_);
00032     virtual ~HotRodClientException() throw();
00033     virtual const char* what() const throw();
00034   private:
00035     std::string message;
00036     uint64_t message_id;
00037     uint8_t status;
00038 };
00039 
00045 class HR_EXTERN TransportException : public HotRodClientException
00046 {
00047   public:
00048     TransportException(const std::string& host, int port, const std::string&);
00049     ~TransportException() throw();
00050 
00051     const std::string& getHost() const;
00052     int getPort() const;
00053   private:
00054     const std::string host;
00055     int port;
00056 };
00057 
00063 class HR_EXTERN InvalidResponseException : public HotRodClientException
00064 {
00065   public:
00066     InvalidResponseException(const std::string&);
00067 };
00068 
00074 class HR_EXTERN RemoteNodeSuspectException : public HotRodClientException
00075 {
00076   public:
00077     RemoteNodeSuspectException(const std::string&, uint64_t message_id, uint8_t status);
00078 };
00079 
00084 class HR_EXTERN InternalException : public HotRodClientException
00085 {
00086   public:
00087     InternalException(const std::string&);
00088 };
00089 
00096 class HR_EXTERN RemoteCacheManagerNotStartedException : public HotRodClientException
00097 {
00098   public:
00099     RemoteCacheManagerNotStartedException(const std::string&);
00100 };
00101 
00106 struct HR_EXTERN UnsupportedOperationException : public HotRodClientException
00107 {
00108         UnsupportedOperationException();
00109 };
00110 
00111 }} // namespace
00112 
00113 #endif  /* ISPN_HOTROD_EXCEPTIONS_H */

Generated on 26 Mar 2014 for InfinispanHotRodC++Client by  doxygen 1.4.7