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_server_session_h_ 7 : #define vnsw_agent_metadata_server_session_h_ 8 : 9 : #include "http/http_session.h" 10 : #include "services/metadata_server.h" 11 : 12 : class MetadataServerSession : public HttpSession { 13 : public: 14 : static const int kMetadataSessionInstance = 0; 15 : 16 0 : MetadataServerSession(HttpServer *server, SslSocket *socket) 17 0 : : HttpSession(server, socket) {} 18 0 : virtual ~MetadataServerSession() {} 19 : 20 : // return a session instance of 1 to ensure that only one 21 : // session request is processed at any time 22 0 : virtual int GetSessionInstance() const { return kMetadataSessionInstance; } 23 : 24 : private: 25 : DISALLOW_COPY_AND_ASSIGN(MetadataServerSession); 26 : }; 27 : 28 : #endif // vnsw_agent_metadata_server_session_h_