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
00031
00032
00033
00034
00035
00036
00037
00038
00039 #ifndef SIDEPORTLISTENER_H_
00040 #define SIDEPORTLISTENER_H_
00041
00042 #include <vector>
00043 #include "Identifiers.h"
00044 #include "CommunicationListener.h"
00045
00046 using std::vector;
00047
00048 namespace ariba {
00049
00050
00051 class Node;
00052 class AribaModule;
00053 namespace overlay {
00054 class BaseOverlay;
00055 }
00056
00063 class SideportListener {
00064
00065 friend class Node;
00066 friend class AribaModule;
00067 friend class overlay::BaseOverlay;
00068
00069 public:
00070
00075 static SideportListener DEFAULT;
00076
00080 SideportListener();
00081
00085 virtual ~SideportListener();
00086
00094 string getEndpointDescription(
00095 const LinkID& link
00096 ) const;
00097
00104 string getEndpointDescription(
00105 const NodeID& node = NodeID::UNSPECIFIED
00106 ) const;
00107
00116 const NodeID& getNodeID(
00117 const LinkID& link = LinkID::UNSPECIFIED
00118 ) const;
00119
00129 vector<LinkID> getLinkIDs(
00130 const NodeID& node = NodeID::UNSPECIFIED
00131 ) const;
00132
00133 protected:
00134
00143 virtual void onLinkUp(
00144 const LinkID& lnk,
00145 const NodeID& local,
00146 const NodeID& remote,
00147 const SpoVNetID& spovnet
00148 );
00149
00158 virtual void onLinkDown(
00159 const LinkID& lnk,
00160 const NodeID& local,
00161 const NodeID& remote,
00162 const SpoVNetID& spovnet
00163 );
00164
00173 virtual void onLinkChanged(
00174 const LinkID& lnk,
00175 const NodeID& local,
00176 const NodeID& remote,
00177 const SpoVNetID& spovnet
00178 );
00179
00188 virtual void onLinkFail(
00189 const LinkID& lnk,
00190 const NodeID& local,
00191 const NodeID& remote,
00192 const SpoVNetID& spovnet
00193 );
00194
00195 private:
00196
00202 void configure(
00203 overlay::BaseOverlay* _overlay
00204 );
00205
00210 overlay::BaseOverlay* overlay;
00211
00212 };
00213
00214 }
00215
00216 #endif // SIDEPORTLISTENER_H_