注册硬件信息
@param handler 结果回调
422969
public void registerHardwareCapability(final RegisterHardwareCapabilityHandler handler){
        HMSAgentLog.i("registerHardwareCapability: handler=" + StrUtils.objDesc(handler));
        this.handler = handler;
        this.retryTimes = MAX_RETRY_TIMES;
        connect();
    }
1118681
public void attach(ElementHandler<T> handler) {
    	NodeState<T> state = buildState();
    	context.addElementHandler(state, handler);
    }
357641
public static void registerMessageHandler(Class<? extends AVIMMessage> clazz,
                                            MessageHandler<?> handler) {
    Set<MessageHandler> handlerSet = new CopyOnWriteArraySet<>();

    Set<MessageHandler> set = messageHandlerRepository.putIfAbsent(clazz, handlerSet);
    if (set != null) {
      handlerSet = set;
    }
    handlerSet.add(handler);
  }
615647
public <T> Response<T> toResponse(ResponseHandler<T> handler) {
        ResponseInfo responseInfo = new ResponseInfo(this.url, this.statusCode, this.headers, body());
        try {
            T result = handler.handle(responseInfo);
            return new Response<>(this.url, this.statusCode, this.cookies, this.headers, result);
        } catch (IOException e) {
            throw new RequestsException(e);
        } finally {
            close();
        }
    }
181399
def set_handler(self, handler):
        
        if self._handler:
            raise Exception('Handler was already set')
        if handler:
            self._handler = async_task(handler, loop=self._loop)
1259306
public void checkSignIn(final SignInHandler handler){
        HMSAgentLog.i("checkSignIn:handler=" + StrUtils.objDesc(handler));

        if (this.handler != null) {
            HMSAgentLog.e("has already a signIn to dispose");
            new Handler(Looper.getMainLooper()).post(new CallbackResultRunnable<SignInHuaweiId>(handler, HMSAgent.AgentResultCode.REQUEST_REPEATED, null));
            return;
        }

        this.handler = handler;
        retryTimes = MAX_RETRY_TIMES;
        connect();
    }
754231
final void addHandler(final HttpHandler handler) {
    if (handler != null) {
      if (!eventHandlers.containsKey(handler.getUriSpecification().toLowerCase())) {
        eventHandlers.put(handler.getUriSpecification().toLowerCase(), handler);
      } else {
        LOG.log(Level.WARNING, "JettyHandler handle is already registered: {0} ", handler.getUriSpecification());
      }
    }
  }
1100521
public void registerServiceHandler(String name, Object handler) {
        Map<String, Object> serviceHandlers = getServiceHandlers();
        serviceHandlers.put(name, handler);
    }
784842
def log_handler(self, handler):
        
        if not self.opened():
            handler = handler or util.noop
            self._log_handler = enums.JLinkFunctions.LOG_PROTOTYPE(handler)
            self._dll.JLINKARM_EnableLog(self._log_handler)
1218777
private void addHandler(Handler handler, ClassLoader loader)
  {
    // handlers ordered by level
    ArrayList<Handler> handlers = new ArrayList<Handler>();

    handlers.add(handler);

    for (ClassLoader ptr = loader; ptr != null; ptr = ptr.getParent()) {
      Handler []localHandlers = _localHandlers.getLevel(ptr);

      if (localHandlers != null) {
        for (int i = 0; i < localHandlers.length; i++) {
          int p = handlers.indexOf(localHandlers[i]);

          if (p < 0) {
            handlers.add(localHandlers[i]);
          }
          else {
            Handler oldHandler = handlers.get(p);

            if (localHandlers[i].getLevel().intValue()
                < oldHandler.getLevel().intValue()) {
              handlers.set(p, localHandlers[i]);
            }
          }
        }
      }
    }

    Handler []newHandlers = new Handler[handlers.size()];
    handlers.toArray(newHandlers);
    
    if (loader == _systemClassLoader)
      loader = null;

    _localHandlers.set(newHandlers, loader);
  }
259989
public void setContentHandler(ContentHandler handler)
  {

    if (handler == null)
    {
      throw new NullPointerException(XSLMessages.createMessage(XSLTErrorResources.ER_NULL_CONTENT_HANDLER, null)); //"Null content handler");
    }
    else
    {
      m_outputContentHandler = handler;

      if (null == m_serializationHandler)
      {
        ToXMLSAXHandler h = new ToXMLSAXHandler();
        h.setContentHandler(handler);
        h.setTransformer(this);
        
        m_serializationHandler = h;
      }
      else
        m_serializationHandler.setContentHandler(handler);
    }
  }
818881
protected void assignDataToHandler(ServerHandlerClass handler, Object instance) {
	    if(getParentExtension().getConfigProperties() != null) {
	        new ConfigPropertyDeserializer().deserialize(
	                handler.getPropertiesClassWrapper(), 
	                instance, 
	                getParentExtension().getConfigProperties());
	    }
    }
608306
private ChannelHandler channelInitFix(final ChannelHandler handler)
	{
		ChannelHandler fixedHandler=new ShareableChannelInboundHandler() {
			@Override
			public void channelRegistered(ChannelHandlerContext ctx) throws Exception {
				Channel ch=ctx.channel();
				setChannel(ch);
				ctx.pipeline().addLast(handler);
				ctx.pipeline().remove(this);//移除当前handler
				ctx.fireChannelRegistered();//从当前handler往后抛出事件
			}
		};
		return fixedHandler;
	}
264323
function handler(responseCode, data, ioArgs) {
                    that.xhr = ioArgs.xhr;
                    that.statusCode = that.xhr && !that.xhr.timedOut && that.xhr.status || 0;
                    if (that.canceled) {
                        logger.debug("Request [" + that.id + "] was canceled, not calling handler");
                    } else {
                        that.pending = false;
                        that.complete = true;
                        paramHandler(responseCode, data, ioArgs);
                    }
                }
324254
public Yoke listen(int port, @NotNull Handler<Boolean> handler) {
        return listen(port, "0.0.0.0", handler);
    }
787300
public static void bind(Source source, RouteParameterHandler handler) {
        if (BINDINGS.containsKey(source)) {
            LoggerFactory.getLogger(Bindings.class).warn("Replacing a route parameter binding for {} by {}",
                    source.name(), handler);
        }
        BINDINGS.put(source, handler);
    }
1211966
public void getPurchaseInfo(PurchaseInfoRequest request, GetPurchaseInfoHandler handler) {
        HMSAgentLog.i("getPurchaseInfo:request=" + StrUtils.objDesc(request) + "  handler=" + StrUtils.objDesc(handler));
        this.purchaseInfoReq = request;
        this.handler = handler;
        this.retryTimes = MAX_RETRY_TIMES;
        connect();
    }