X-Git-Url: https://git.teslayout.com/public/public/public/?p=anna.git;a=blobdiff_plain;f=source%2Fcomm%2FServer.cpp;h=9be5fcc43ae1daf919ff2e171c33fc544a93acfd;hp=186991050c393fc59337570e7d2b1c1d6c0562d0;hb=5a6cba5fde2b2f538a7515f8293cc0a8d9589dfa;hpb=af9c86ffb0e28d35ad94d99c5f77e41578c972b4 diff --git a/source/comm/Server.cpp b/source/comm/Server.cpp index 1869910..9be5fcc 100644 --- a/source/comm/Server.cpp +++ b/source/comm/Server.cpp @@ -66,7 +66,7 @@ comm::Server::~Server() { * orden que el usado en el Server::connect. */ void comm::Server::reset() -throw(RuntimeException) { +noexcept(false) { // La SSCC se establece en el método que invoca a éste // Guard guard (*this, "comm::Server::reset"); if(a_clientSocket == NULL) @@ -78,7 +78,7 @@ throw(RuntimeException) { } void comm::Server::setReceiverFactory(comm::ReceiverFactory& receiverFactory) -throw() { +{ a_receiverFactory = &receiverFactory; if(a_clientSocket != NULL) @@ -128,7 +128,7 @@ throw() { */ void comm::Server::connect() -throw(RuntimeException) { +noexcept(false) { LOGMETHOD(TraceMethod tm(Logger::Local7, "comm::Server", "connect", ANNA_FILE_LOCATION)); Communicator* communicator = functions::component (ANNA_FILE_LOCATION); /* @@ -195,7 +195,7 @@ throw(RuntimeException) { // se intenta usar => se intenta volver a conectar antes de dar el fallo. //--------------------------------------------------------------------------------------- comm::ClientSocket* comm::Server::send(Message& message) -throw(RuntimeException) { +noexcept(false) { LOGMETHOD(TraceMethod tm(Logger::Local7, "comm::Server", "send", ANNA_FILE_LOCATION)); Guard guard(*this, "comm::Server::send"); const bool available = isAvailable(); @@ -215,32 +215,32 @@ throw(RuntimeException) { } comm::ClientSocket* comm::Server::send(Message* message) -throw(RuntimeException) { +noexcept(false) { if(message == NULL) throw RuntimeException("anna::comm::Server::send | Cannot send a NULL message", ANNA_FILE_LOCATION); return send(*message); } -void comm::Server::setAutoRecovery(bool autoRecovery) throw() { +void comm::Server::setAutoRecovery(bool autoRecovery) { bool* ar = const_cast (&a_autoRecovery); *ar = autoRecovery; } bool comm::Server::isAvailable() const -throw(RuntimeException) { +noexcept(false) { // Guard guard (*this, "comm::Server::isAvailable"); return (a_clientSocket == NULL) ? false : (a_clientSocket->isConnected() && (a_clientSocket->isClosedPending() == false)); } // Este metodo sea re-escrito en commsec::Server::allocateClientSocket para devolver un commsec::RemoteConnection comm::ClientSocket* comm::Server::allocateClientSocket(const comm::INetAddress& in, comm::TransportFactory* transportFactory) const -throw() { +{ return new ClientSocket(in, transportFactory); } string comm::Server::asString() const -throw() { +{ string result("comm::Server { "); result += Resource::asString(); result += " | Sequence: "; @@ -260,7 +260,7 @@ throw() { } xml::Node* comm::Server::asXML(xml::Node* parent) const -throw(RuntimeException) { +noexcept(false) { xml::Node* result = parent->createChild("comm.Server"); result->createAttribute("Host", a_host.getName()); result->createAttribute("Sequence", a_sequence);