1 // ANNA - Anna is Not Nothingness Anymore //
3 // (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo //
5 // See project site at http://redmine.teslayout.com/projects/anna-suite //
6 // See accompanying file LICENSE or copy at http://www.teslayout.com/projects/public/anna.LICENSE //
9 #include <anna/http/MessageFactory.hpp>
13 http::Message* http::MessageFactory::create(const http::Message::Type::_v type)
14 throw(RuntimeException) {
15 if(type == Message::Type::Request)
16 return a_requests.create();
18 return a_responses.create();
21 void http::MessageFactory::release(http::Message* message)
28 if(message->getType() == Message::Type::Request)
29 a_requests.release(static_cast <Request*>(message));
31 a_responses.release(static_cast <Response*>(message));