Line data Source code
1 : /* 2 : * Copyright (c) 2014 Juniper Networks, Inc. All rights reserved. 3 : * Copyright Contributors to the OpenSDN project 4 : */ 5 : 6 : #ifndef vnsw_agent_metadata_client_session_h_ 7 : #define vnsw_agent_metadata_client_session_h_ 8 : 9 : #include "http/client/http_client.h" 10 : #include "http/http_session.h" 11 : #include "services/metadata_client.h" 12 : 13 : class MetadataClientSession : public HttpClientSession { 14 : public: 15 : static const int kMetadataSessionInstance = 0; 16 : 17 0 : MetadataClientSession(HttpClient *client, Socket *socket) 18 0 : : HttpClientSession(client, socket) {} 19 0 : virtual ~MetadataClientSession() {} 20 : 21 : // return a session instance of 0 to ensure that only one 22 : // session request is processed at any time 23 0 : virtual int GetSessionInstance() const { return kMetadataSessionInstance; } 24 : 25 : private: 26 : DISALLOW_COPY_AND_ASSIGN(MetadataClientSession); 27 : }; 28 : 29 : #endif // vnsw_agent_metadata_client_session_h_