Examples of handler()


Examples of io.vertx.core.net.NetSocketStream.handler()

  public void testReadStreamPauseResume() {
    server.close();
    server = vertx.createNetServer(new NetServerOptions().setAcceptBacklog(1).setPort(1234).setHost("localhost"));
    NetSocketStream socketStream = server.connectStream();
    AtomicBoolean paused = new AtomicBoolean();
    socketStream.handler(so -> {
      assertTrue(!paused.get());
      so.write("hello");
      so.close();
    });
    server.listen(ar -> {
View Full Code Here

Examples of io.vertx.core.net.NetSocketStream.handler()

  @Test
  public void testNetSocketStreamCallbackIsAsync() {
    this.server = vertx.createNetServer(new NetServerOptions());
    AtomicInteger done = new AtomicInteger();
    NetSocketStream stream = server.connectStream();
    stream.handler(req -> {});
    ThreadLocal<Object> stack = new ThreadLocal<>();
    stack.set(true);
    stream.endHandler(v -> {
      assertTrue(vertx.context().isEventLoopContext());
      assertNull(stack.get());
View Full Code Here

Examples of nginx.clojure.NginxRequest.handler()

  }
 
  @Override
  public Object[] invoke(Map<String, Object> request) {
    NginxRequest req = (NginxRequest) request;
    NginxHttpServerChannel downstream = req.handler().hijack(req, true);
    downstream.addListener(downstream, new ChannelListener<NginxHttpServerChannel>() {

      @Override
      public void onClose(NginxHttpServerChannel data) {
        log.info("***downstream closed!");
View Full Code Here

Examples of nginx.clojure.NginxRequest.handler()

  }
 
  @Override
  public Object[] invoke(Map<String, Object> request) {
    NginxRequest req = (NginxRequest) request;
    NginxHttpServerChannel serverChannel = req.handler().hijack(req, false);
    NginxClojureAsynSocket asynSocket = new NginxClojureAsynSocket();
    AsynHttpContext ctx = new AsynHttpContext();
    ctx.rc = ctx.wc = 0;
//    tell server we won't keep-alive, we have two choices :
//    (1) http header  "Connection" = close
View Full Code Here

Examples of org.eclipse.sapphire.ui.forms.ActuatorPart.handler()

            new SelectionAdapter()
            {
                @Override
                public void widgetSelected( SelectionEvent e )
                {
                    final SapphireActionHandler handler = part.handler();
                   
                    if( handler != null )
                    {
                        handler.execute( ActuatorButtonPresentation.this );
                    }
View Full Code Here

Examples of org.eclipse.sapphire.ui.forms.ActuatorPart.handler()

            new HyperlinkAdapter()
            {
                @Override
                public void linkActivated( final HyperlinkEvent event )
                {
                    final SapphireActionHandler handler = part.handler();
                   
                    if( handler != null )
                    {
                        handler.execute( ActuatorLinkPresentation.this );
                    }
View Full Code Here

Examples of org.nutz.dao.cache.method.IDaoCacheMethodHandler.handler()

    CacheStrategy cacheStrategy=new CacheStrategy();
    cacheStrategy.setDao(dao);
    ObsArgClass msg=new ObsArgClass(method,args,cacheStrategy,cache);
    IDaoCacheMethodHandler daoHandler=DAO_METHOD_HANDLERS.get(method.getName());
    if(daoHandler!=null){
      return daoHandler.handler(msg);
    }
    return method.invoke(dao, args);
  }
 
  public Cache getCache() {
View Full Code Here

Examples of org.raml.parser.annotation.Mapping.handler()

                required = scalar.required();
            }
            else if (mapping != null)
            {
                tupleRule = createMappingRule(declaredField, mapping);
                tupleHandler = createHandler(mapping.handler(), mapping.alias(), MappingNode.class);
                required = mapping.required();
                if (tupleRule instanceof MapTupleRule)
                {
                    ((MapTupleRule) tupleRule).setInnerTupleHandler(createHandler(mapping.innerHandler(), "", null));
                }
View Full Code Here

Examples of org.raml.parser.annotation.Mapping.handler()

            }
            else if (mapping != null)
            {
                tupleBuilder = createMappingBuilder(declaredField, mapping);
                tupleHandler = createHandler(mapping.handler(), mapping.alias(), MappingNode.class);
                if (tupleBuilder instanceof MapTupleBuilder)
                {
                    ((MapTupleBuilder) tupleBuilder).setInnerTupleHandler(createHandler(mapping.innerHandler(), "", null));
                }
            }
View Full Code Here

Examples of org.raml.parser.annotation.Scalar.handler()

            TupleHandler tupleHandler = null;
            boolean required = false;
            if (scalar != null)
            {
                tupleRule = createScalarRule(declaredField, scalar);
                tupleHandler = createHandler(scalar.handler(), scalar.alias(), ScalarNode.class);
                required = scalar.required();
            }
            else if (mapping != null)
            {
                tupleRule = createMappingRule(declaredField, mapping);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.