a_dwr(ClassCode::ApplicationMessage) // not actually needed; Message is application type by default
{ initialize(); }
-void ServerSession::initialize() throw() {
+void ServerSession::initialize() {
Session::initialize();
a_parent = NULL;
a_clientSocket = NULL;
//ServerSession::~ServerSession() {;}
-void ServerSession::setClientSocket(anna::comm::ClientSocket *clientSocket) throw() {
+void ServerSession::setClientSocket(anna::comm::ClientSocket *clientSocket) {
a_clientSocket = clientSocket;
a_clientSocket->setReceiverFactory(a_receiverFactory);
}
-const std::string& ServerSession::getAddress() const throw() {
+const std::string& ServerSession::getAddress() const {
return a_parent->getKey().first;
}
-int ServerSession::getPort() const throw() {
+int ServerSession::getPort() const {
return a_parent->getKey().second;
}
-const Response* ServerSession::send(const Message* message) throw(anna::RuntimeException) {
+const Response* ServerSession::send(const Message* message) noexcept(false) {
LOGMETHOD(anna::TraceMethod traceMethod(a_className, "send", ANNA_FILE_LOCATION));
if(!message)
-bool ServerSession::unbind(bool forceDisconnect) throw(anna::RuntimeException) {
+bool ServerSession::unbind(bool forceDisconnect) noexcept(false) {
LOGMETHOD(anna::TraceMethod traceMethod(a_className, "unbind", ANNA_FILE_LOCATION));
if(a_state == State::Closed)
return false;
}
-void ServerSession::eventPeerShutdown() throw() {
+void ServerSession::eventPeerShutdown() {
// Inform father server:
a_parent->eventPeerShutdown(this);
}
-void ServerSession::eventRequestRetransmission(Message *request) throw() {
+void ServerSession::eventRequestRetransmission(Message *request) {
// OAM
OamModule &oamModule = OamModule::instantiate();
a_parent->eventRequestRetransmission(this, request);
}
-void ServerSession::eventResponse(const Response& response) throw(anna::RuntimeException) {
+void ServerSession::eventResponse(const Response& response) noexcept(false) {
// Inform father server:
a_parent->eventResponse(response);
}
-void ServerSession::eventRequest(const anna::DataBlock &request) throw(anna::RuntimeException) {
+void ServerSession::eventRequest(const anna::DataBlock &request) noexcept(false) {
// Inform father server:
a_parent->eventRequest(this, request);
}
-void ServerSession::eventUnknownResponse(const anna::DataBlock& response) throw(anna::RuntimeException) {
+void ServerSession::eventUnknownResponse(const anna::DataBlock& response) noexcept(false) {
// Inform father server:
a_parent->eventUnknownResponse(this, response);
}
-void ServerSession::eventDPA(const anna::DataBlock& response) throw(anna::RuntimeException) {
+void ServerSession::eventDPA(const anna::DataBlock& response) noexcept(false) {
// Inform father server:
a_parent->eventDPA(this, response);
}
// Se invoca desde el diameter::comm::Receiver
//------------------------------------------------------------------------------------------
void ServerSession::receive(const anna::comm::Message& message)
-throw(anna::RuntimeException) {
+noexcept(false) {
LOGMETHOD(anna::TraceMethod traceMethod(a_className, "receive", ANNA_FILE_LOCATION));
// Activity:
updateIncomingActivityTime();
unbind(true /* always immediate */);
}
-void ServerSession::finalize() throw() {
+void ServerSession::finalize() {
LOGMETHOD(anna::TraceMethod traceMethod(a_className, "finalize", ANNA_FILE_LOCATION));
// Configuration overiddings
setOnDisconnect(OnDisconnect::IgnorePendings);
void ServerSession::sendCEA()
-throw(anna::RuntimeException) {
+noexcept(false) {
LOGMETHOD(anna::TraceMethod traceMethod(a_className, "sendCEA", ANNA_FILE_LOCATION));
anna::DataBlock cea(true);
a_engine->readCEA(cea, a_cer.getBody()); // Asume that CEA is valid ...
}
void ServerSession::sendDWA()
-throw(anna::RuntimeException) {
+noexcept(false) {
LOGMETHOD(anna::TraceMethod traceMethod(a_className, "sendDWA", ANNA_FILE_LOCATION));
anna::DataBlock dwa(true);
a_engine->readDWA(dwa, a_dwr.getBody()); // Asume that DWA is valid ...
// Se invoca desde diameter::comm::Timer
//-------------------------------------------------------------------------
void ServerSession::expireResponse(diameter::comm::Response* response)
-throw() {
+{
LOGMETHOD(anna::TraceMethod traceMethod(a_className, "expireResponse", ANNA_FILE_LOCATION));
Session::expireResponse(response);
// OAM
}
std::string ServerSession::asString() const
-throw() {
+{
string result = Session::asString();
result += " | Parent Local Server: ";
result += anna::functions::socketLiteralAsString(getAddress(), getPort());
}
anna::xml::Node* ServerSession::asXML(anna::xml::Node* parent) const
-throw() {
+{
anna::xml::Node* result = Session::asXML(parent);
parent->createChild("diameter.comm.ServerSession");
result->createAttribute("ParentLocalServer", anna::functions::socketLiteralAsString(getAddress(), getPort()));
//------------------------------------------------------------------------------
//------------------------------------------------------ ServerSession::expire()
//------------------------------------------------------------------------------
-void ServerSession::expire(anna::timex::Engine *timeController) throw(anna::RuntimeException) {
+void ServerSession::expire(anna::timex::Engine *timeController) noexcept(false) {
LOGMETHOD(anna::TraceMethod traceMethod(a_className, "expire (inactivity check timer)", ANNA_FILE_LOCATION));
LOGWARNING(anna::Logger::warning("Detecting anomaly (too inactivity time) over server session. Resetting", ANNA_FILE_LOCATION));
// OAM
unbind(true /* always immediate */); // no delegamos en un planning o similar
}
-void ServerSession::setAllowedInactivityTime(const anna::Millisecond & allowedInactivityTime) throw() {
+void ServerSession::setAllowedInactivityTime(const anna::Millisecond & allowedInactivityTime) {
setTimeout(allowedInactivityTime);
}
//------------------------------------------------------------------------------
//---------------------------------- ServerSession::updateIncomingActivityTime()
//------------------------------------------------------------------------------
-void ServerSession::updateIncomingActivityTime() throw() {
+void ServerSession::updateIncomingActivityTime() {
Session::updateIncomingActivityTime();
a_parent->updateIncomingActivityTime();
}
//------------------------------------------------------------------------------
//---------------------------------- ServerSession::updateOutgoingActivityTime()
//------------------------------------------------------------------------------
-void ServerSession::updateOutgoingActivityTime(void) throw() {
+void ServerSession::updateOutgoingActivityTime(void) {
Session::updateOutgoingActivityTime();
a_parent->updateOutgoingActivityTime();
}
//------------------------------------------------------------------------------
//----------------------------------------------- ServerSession::countSendings()
//------------------------------------------------------------------------------
-void ServerSession::countSendings(const diameter::CommandId & cid, unsigned int aid, bool ok)throw() {
+void ServerSession::countSendings(const diameter::CommandId & cid, unsigned int aid, bool ok){
OamModule &oamModule = OamModule::instantiate();
ApplicationMessageOamModule &appMsgOamModule = ApplicationMessageOamModule::instantiate();