Subscribes an external handler to this channel.
3064
def subscribe(self, receiver):
        ""
        log.debug('{0}.{1} subscribe to {2}'
                  .format(receiver.__module__, receiver.__name__, self))
        self.signal.connect(receiver)
1308221
def broadcast(self, channel, event, data):
        """"""
        payload = self._server.serialize_event(event, data)
        for socket_id in self.subscriptions.get(channel, ()):
            rv = self._server.sockets.get(socket_id)
            if rv is not None:
                rv.socket.send(payload)
836661
function subscribe(conn, channels) {
  return this.doSubscribe(
    PUBSUB.SUBSCRIBE,
    PUBSUB.CHANNELS,
    this._channels, conn, channels);
}
633235
def subscribe(self, stream_type, **parameters):
        """"""
        parameters["stream_type"] = stream_type

        if (stream_type == "result") and ("buffering" not in parameters):
            parameters["buffering"] = True

        self.socketIO.emit(self.EVENT_NAME_SUBSCRIBE, parameters)
1065214
@Override
    @CallerSideMethod public void subscribe(Subscriber subs) {
        // need callerside to transform to Callback
        Callback callback = (r, e) -> {
            if (Actors.isResult(e))
                subs.getReceiver().receive((ChangeMessage) r);
        };
        _subscribe(subs.getFilter(), callback, subs.getId());
    }
884930
def auto_subscribe(self, app_manager):
        """"""
        for handler in app_manager.handler_classes:
            app_manager.subscribe(handler.channel(), self)
900307
def _registerHandler(self, handler):
        
        self._logger.addHandler(handler)
        self._handlers.append(handler)
836269
def subscribe(self, socket_id, channel):
        """"""
        con = self._get_connection(socket_id)
        self.subscriptions.setdefault(channel, set()).add(socket_id)
        con.subscriptions.add(channel)
1361410
def subscribe(self, *, create_task=True, **params):
        
        if create_task and not self.task:
            self.task = asyncio.ensure_future(self.run(**params))
        return self.channel.subscribe()
1190033
@Override @CallerSideMethod
    public void subscribe(Subscriber<? super OUT> subscriber) {
        if ( isRemote() ) {
            synchronized (this) { // subscribe/unsubscribe won't be contended
                if ( _callerSideSubscribers == null ) {
                    _callerSideSubscribers = new ArrayList();
                }
                _callerSideSubscribers.add(subscriber);
            }
        }
        if ( subscriber == null )
        {
            subscriber.onError( new IllegalArgumentException("cannot subscibe null") );
            return;
        }
        _subscribe((res, err) -> {
            if (isError(err)) {
                subscriber.onError((Throwable) err);
            } else if (isComplete(err)) {
                subscriber.onComplete();
            } else {
                subscriber.onNext((OUT) res);
            }
        }).then(subs -> {
            Log.Info(this, "stream subscribe acknowledged");
            subscriber.onSubscribe(subs);
        });
    }
881467
def handler(self, value):
        

        if value is not None:
            assert issubclass(value, SocketServer.BaseRequestHandler), \
                "'{0}' attribute: '{1}' is not 'SocketServer.BaseRequestHandler' subclass!".format("handler", value)
        self.__handler = value
        self.__handler.container = self
78288
def putSubHandler(self, prefix, handler):
        '''
        '''
        self.subHandlers[prefix] = handler
        handler._parent = self
        return self
143529
function (ortc, channel, message) {
        if (ortc != null && subscribedChannels[channel] && subscribedChannels[channel].isSubscribed && subscribedChannels[channel].onMessageCallback != null) {
            subscribedChannels[channel].onMessageCallback(ortc, channel, message);
        }
    }
550606
function (channel, subscription, context) {
      Backbone.Mediator.subscribe(channel, subscription, context, true);
    }
128089
@Override
  public void channelActive(final ChannelHandlerContext ctx) throws Exception {
    this.channelGroup.add(ctx.channel());
    this.listener.channelActive(ctx);
    super.channelActive(ctx);
  }
276351
def add_handler(self, message_type, handler):
        """"""
        if message_type not in self._handlers:
            self._handlers[message_type] = []

        if handler not in self._handlers[message_type]:
            self._handlers[message_type].append(handler)
680310
public static void send(UnitRequest unitRequest, NotifyHandler handler) {
        unitRequest.getContext().setRouted(true);
        singleton.send(unitRequest, handler);
    }