def __init__(self, connection_class=Connection, connection_params=None): ConnectionManager.__init__(self, connection_class=connection_class, connection_params=connection_params) self._lock = amfast.mutex_cls() self.reset()
def __init__(self, name, max_connections=-1, endpoint=None): self.name = name self.max_connections = max_connections if endpoint is None: from endpoint import AmfEndpoint endpoint = AmfEndpoint() self.endpoint = endpoint self._lock = amfast.mutex_cls() self._channel_set = None
def __init__(self, service_mapper=None, connection_manager=None, subscription_manager=None, notify_connections=False, clean_freq=300): if service_mapper is None: from amfast.remoting import ServiceMapper service_mapper = ServiceMapper() self.service_mapper = service_mapper if connection_manager is None: connection_manager = cm.MemoryConnectionManager() self.connection_manager = connection_manager if subscription_manager is None: subscription_manager = sm.MemorySubscriptionManager() self.subscription_manager = subscription_manager self.notify_connections = notify_connections self.clean_freq = clean_freq self._lock = amfast.mutex_cls() self._channels = {} self.scheduleClean()
def __init__(self, secure=False, ttl=30000): SubscriptionManager.__init__(self, secure=secure, ttl=ttl) self._lock = amfast.mutex_cls() self.reset()