Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 from include.pubsub.iPubSub import Ipublisher, Isubscriber, IqueryBuilder
00018
00019 from include.pubsub.contextbroker.cbPublisher import CbPublisher
00020 from include.pubsub.contextbroker.cbSubscriber import CbSubscriber
00021 from include.pubsub.contextbroker.cbQueryBuilder import CbQueryBuilder
00022
00023 PUBSUB_TYPE = "ContextBroker"
00024
00025
00026 class PublisherFactory:
00027 @staticmethod
00028 def create():
00029 if PUBSUB_TYPE is "ContextBroker":
00030 return CbPublisher()
00031 else:
00032 return Ipublisher()
00033
00034 @staticmethod
00035 def getClass():
00036 if PUBSUB_TYPE is "ContextBroker":
00037 return CbPublisher
00038 else:
00039 return Ipublisher
00040
00041
00042 class SubscriberFactory:
00043 @staticmethod
00044 def create():
00045 if PUBSUB_TYPE is "ContextBroker":
00046 return CbSubscriber()
00047 else:
00048 return Isubscriber()
00049
00050 @staticmethod
00051 def getClass():
00052 if PUBSUB_TYPE is "ContextBroker":
00053 return CbSubscriber
00054 else:
00055 return Isubscriber
00056
00057
00058 class QueryBuilderFactory:
00059 @staticmethod
00060 def create():
00061 if PUBSUB_TYPE is "ContextBroker":
00062 return CbQueryBuilder()
00063 else:
00064 return IqueryBuilder()
00065
00066 @staticmethod
00067 def getClass():
00068 if PUBSUB_TYPE is "ContextBroker":
00069 return CbQueryBuilder
00070 else:
00071 return IqueryBuilder