PortNamingConvention.cpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #include "config.h"
00031
00032 #include "PortNamingConvention.hpp"
00033
00034 #include <sstream>
00035 #include <string>
00036
00037 using namespace mermaid::support::communication;
00038
00039 std::string PortNamingConvention::getServiceRequestRequestPortName (std::string requesterEntityName, std::string requesterServiceName, std::string targetEntityName, std::string targetServiceName)
00040 {
00041 std::stringstream ss;
00042
00043 ss << "/" << requesterEntityName << "/" << requesterServiceName << "/" << "service-request" << "/" << "request" << "/" << targetEntityName << "/" << targetServiceName;
00044
00045 return ss.str();
00046 };
00047
00048 std::string PortNamingConvention::getServiceRequestInputPortName (std::string entityName, std::string serviceName)
00049 {
00050 std::stringstream ss;
00051
00052 ss << "/" << entityName << "/" << serviceName << "/" << "service-request" << "/" << "input";
00053
00054 return ss.str();
00055 };
00056
00057
00058 std::string PortNamingConvention::getServiceRequestOutputPortName (std::string entityName, std::string serviceName, std::string requesterEntityName, std::string requesterServiceName)
00059 {
00060 std::stringstream ss;
00061
00062 ss << "/" << entityName << "/" << serviceName << "/" << "service-request" << "/" << "output" << "/" << requesterEntityName << "/" << requesterServiceName;
00063
00064 return ss.str();
00065 };
00066
00067 std::string PortNamingConvention::getServiceRequestReplyPortName (std::string requesterEntityName, std::string requesterServiceName, std::string targetEntityName, std::string targetServiceName)
00068 {
00069 std::stringstream ss;
00070
00071 ss << "/" << requesterEntityName << "/" << requesterServiceName << "/" << "service-request" << "/" << "reply" << "/" << targetEntityName << "/" << targetServiceName;
00072
00073 return ss.str();
00074 };
00075
00076 std::string PortNamingConvention::getDataFeedOutputPortName (std::string producerEntityName, std::string producerServiceName, std::string producerDatafeedName)
00077 {
00078 std::stringstream ss;
00079
00080 ss << "/" << producerEntityName << "/" << producerServiceName << "/" << "data-feed" << "/" << "output" << "/" << producerDatafeedName;
00081 return ss.str();
00082 };
00083
00084 std::string PortNamingConvention::getDataFeedInputPortName (std::string consumerEntityName, std::string consumerServiceName, std::string producerEntityName, std::string producerServiceName, std::string producerDatafeedName)
00085 {
00086 std::stringstream ss;
00087
00088 ss << "/" << consumerEntityName << "/" << consumerServiceName << "/" << "data-feed" << "/" << "input" << "/" << producerEntityName << "/" << producerServiceName << "/" << producerDatafeedName;
00089 return ss.str();
00090 };