blob: 786f99dd6968c9ddabc34bd8f168ddc3e8fe33a1 [file] [log] [blame]
Rizwan Haider65baf552016-09-28 16:47:28 -04001from services.metronetwork.models import *
2from synchronizers.metronetwork.invokers.networkmultipointtomultipointinvoker import NetworkMultipointToMultipointInvoker
3from synchronizers.metronetwork.invokers.networkedgetoedgepointinvoker import NetworkEdgeToEdgePointInvoker
4from synchronizers.metronetwork.invokers.networkedgetomultipointinvoker import NetworkEdgeToMultipointInvoker
5
6
7class InvokerFactory(object):
8 @staticmethod
9 def getinvoker(obj):
10 #
11 # Here is where we build various invokers
12 #
13 if isinstance(obj, NetworkMultipointToMultipointConnection):
14 return NetworkMultipointToMultipointInvoker()
15 elif isinstance(obj, NetworkEdgeToEdgePointConnection):
16 return NetworkEdgeToEdgePointInvoker()
17 elif isinstance(obj, NetworkEdgeToMultipointConnection):
18 return NetworkEdgeToMultipointInvoker()
19 else:
20 return None