当前位置: 首页>>代码示例>>Java>>正文


Java GenIgnore类代码示例

本文整理汇总了Java中io.vertx.codegen.annotations.GenIgnore的典型用法代码示例。如果您正苦于以下问题:Java GenIgnore类的具体用法?Java GenIgnore怎么用?Java GenIgnore使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


GenIgnore类属于io.vertx.codegen.annotations包,在下文中一共展示了GenIgnore类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getProxy

import io.vertx.codegen.annotations.GenIgnore; //导入依赖的package包/类
/**
 * Lookup for a service record and if found, retrieve it and return the service object (used to consume the service).
 * This is a convenient method to avoid explicit lookup and then retrieval of the service. A filter based on the
 * request interface is used.
 *
 * @param discovery     the service discovery instance
 * @param itf           the service interface
 * @param resultHandler the result handler
 * @param <T>           the service interface
 * @return {@code null}
 */
@GenIgnore // Java only
static <T> T getProxy(ServiceDiscovery discovery, Class<T> itf, Handler<AsyncResult<T>>
  resultHandler) {
  JsonObject filter = new JsonObject().put("service.interface", itf.getName());
  discovery.getRecord(filter, ar -> {
    if (ar.failed()) {
      resultHandler.handle(Future.failedFuture(ar.cause()));
    } else {
      if (ar.result() == null) {
        resultHandler.handle(Future.failedFuture("Cannot find service matching with " + filter));
      } else {
        ServiceReference service = discovery.getReference(ar.result());
        resultHandler.handle(Future.succeededFuture(service.get()));
      }
    }
  });
  return null;
}
 
开发者ID:vert-x3,项目名称:vertx-service-discovery,代码行数:30,代码来源:EventBusService.java

示例2: baseCommandClasses

import io.vertx.codegen.annotations.GenIgnore; //导入依赖的package包/类
/**
 * @return the list of base command classes
 */
@GenIgnore
static List<Class<? extends AnnotatedCommand>> baseCommandClasses() {
  List<Class<? extends AnnotatedCommand>> list = new ArrayList<>();
  list.add(Echo.class);
  list.add(Sleep.class);
  list.add(Help.class);
  list.add(FileSystemCd.class);
  list.add(FileSystemPwd.class);
  list.add(FileSystemLs.class);
  list.add(NetCommandLs.class);
  list.add(LocalMapGet.class);
  list.add(LocalMapPut.class);
  list.add(LocalMapRm.class);
  list.add(BusPublish.class);
  list.add(BusSend.class);
  list.add(BusTail.class);
  list.add(VerticleLs.class);
  list.add(VerticleDeploy.class);
  list.add(VerticleUndeploy.class);
  list.add(VerticleFactories.class);
  return list;
}
 
开发者ID:vert-x3,项目名称:vertx-shell,代码行数:26,代码来源:BaseCommandPack.java

示例3: of

import io.vertx.codegen.annotations.GenIgnore; //导入依赖的package包/类
/**
 * Create a tuple of an arbitrary number of elements.
 *
 * @param elements the elements
 * @return the tuple
 */
@GenIgnore
static Tuple of(Object... elements) {
  ArrayTuple tuple = new ArrayTuple(elements.length);
  for (Object elt: elements) {
    tuple.addValue(elt);
  }
  return tuple;
}
 
开发者ID:vietj,项目名称:reactive-pg-client,代码行数:15,代码来源:Tuple.java

示例4: addProperty

import io.vertx.codegen.annotations.GenIgnore; //导入依赖的package包/类
@Override
@GenIgnore
public void addProperty(String name, Object value) {
  if (hasProperties()) {
    this.properties.put(name, value);
  } else {
    properties(new JsonObject().put(name, value));
  }
}
 
开发者ID:etourdot,项目名称:vertx-marklogic,代码行数:10,代码来源:DocumentImpl.java

示例5: create

import io.vertx.codegen.annotations.GenIgnore; //导入依赖的package包/类
@GenIgnore
static <T extends RequestFactory> T create(Vertx vertx, Class<T> factoryClass) {
    T instance;
    try {
        Constructor<T> constructor = factoryClass.getConstructor(Vertx.class);
        instance = constructor.newInstance(vertx);
    } catch (Exception e) {
         throw new RuntimeException(e);
    }

    return instance;
}
 
开发者ID:emikra,项目名称:vertx-json-http-request,代码行数:13,代码来源:RequestFactory.java

示例6: getBodyAsByteArray

import io.vertx.codegen.annotations.GenIgnore; //导入依赖的package包/类
/**
 * @return the body of the frame as a byte array, {@code null} if none.
 */
@GenIgnore
public byte[] getBodyAsByteArray() {
  if (body == null) {
    return null;
  }
  return body.getBytes();
}
 
开发者ID:vert-x3,项目名称:vertx-stomp,代码行数:11,代码来源:Frame.java

示例7: addDisabledMetricsType

import io.vertx.codegen.annotations.GenIgnore; //导入依赖的package包/类
/**
 * Set metric that will not be registered. Schedulers will check the set {@code disabledMetricsTypes} when
 * registering metrics suppliers
 *
 * @param metricsType the type of metrics
 * @return the current {@link VertxHawkularOptions} instance
 */
@GenIgnore
public VertxHawkularOptions addDisabledMetricsType(MetricsType metricsType) {
  if (disabledMetricsTypes == null) {
    disabledMetricsTypes = EnumSet.noneOf(MetricsType.class);
  }
  this.disabledMetricsTypes.add(metricsType);
  return this;
}
 
开发者ID:vert-x3,项目名称:vertx-hawkular-metrics,代码行数:16,代码来源:VertxHawkularOptions.java

示例8: addMetricTagsMatch

import io.vertx.codegen.annotations.GenIgnore; //导入依赖的package包/类
/**
 * Adds a {@link MetricTagsMatch}.
 */
@GenIgnore
public VertxHawkularOptions addMetricTagsMatch(MetricTagsMatch metricTagsMatch) {
  if (metricTagsMatches == null) {
    metricTagsMatches = new ArrayList<>();
  }
  metricTagsMatches.add(metricTagsMatch);
  return this;
}
 
开发者ID:vert-x3,项目名称:vertx-hawkular-metrics,代码行数:12,代码来源:VertxHawkularOptions.java

示例9: current

import io.vertx.codegen.annotations.GenIgnore; //导入依赖的package包/类
/**
 * Get or create a secure non blocking random number generator using the provided vert.x context. This method will not
 * throw an exception.
 *
 * @param context a Vert.x context.
 * @return A secure non blocking random number generator.
 */
@GenIgnore
static VertxContextPRNG current(final Context context) {
  final String contextKey = "__vertx.VertxContextPRNG";
  // attempt to load a PRNG from the current context
  PRNG random = context.get(contextKey);

  if (random == null) {
    synchronized (context) {
      // attempt to reload to avoid double creation when we were
      // waiting for the lock
      random = context.get(contextKey);
      if (random == null) {
        // there was no PRNG in the context, create one
        random = new PRNG(context.owner());
        // need to make the random final
        final PRNG rand = random;
        // save to the context
        context.put(contextKey, rand);
        // add a close hook to shutdown the PRNG
        context.addCloseHook(v -> rand.close());
      }
    }
  }

  return random;
}
 
开发者ID:vert-x3,项目名称:vertx-auth,代码行数:34,代码来源:VertxContextPRNG.java

示例10: create

import io.vertx.codegen.annotations.GenIgnore; //导入依赖的package包/类
@GenIgnore
static WikiDatabaseService create(JDBCClient dbClient, HashMap<SqlQuery, String> sqlQueries, Handler<AsyncResult<WikiDatabaseService>> readyHandler) {
  return new WikiDatabaseServiceImpl(dbClient, sqlQueries, readyHandler);
}
 
开发者ID:vert-x3,项目名称:vertx-guide-for-java-devs,代码行数:5,代码来源:WikiDatabaseService.java

示例11: setAnnotators

import io.vertx.codegen.annotations.GenIgnore; //导入依赖的package包/类
@GenIgnore
public RequestParameters setAnnotators(List<String> annotators) {
  checkProperties();
  properties.put("annotators", String.join(",", annotators));
  return this;
}
 
开发者ID:shikeio,项目名称:vertx-corenlp-client,代码行数:7,代码来源:RequestParameters.java

示例12: addAnnotator

import io.vertx.codegen.annotations.GenIgnore; //导入依赖的package包/类
@GenIgnore
public RequestParameters addAnnotator(String annotator) {
  checkProperties();
  properties.put("annotators", String.join(",", properties.getString("annotators", annotator).split(",")));
  return this;
}
 
开发者ID:shikeio,项目名称:vertx-corenlp-client,代码行数:7,代码来源:RequestParameters.java

示例13: addProperty

import io.vertx.codegen.annotations.GenIgnore; //导入依赖的package包/类
@GenIgnore
public RequestParameters addProperty(String key, Object value) {
  checkProperties();
  properties.put("key", key);
  return this;
}
 
开发者ID:shikeio,项目名称:vertx-corenlp-client,代码行数:7,代码来源:RequestParameters.java

示例14: create

import io.vertx.codegen.annotations.GenIgnore; //导入依赖的package包/类
@GenIgnore
static BookDatabaseService create(PgPool pgPool, Handler<AsyncResult<BookDatabaseService>> resultHandler) {
  return new BookDatabaseServiceImpl(pgPool, resultHandler);
}
 
开发者ID:BillyYccc,项目名称:vertx-postgresql-starter,代码行数:5,代码来源:BookDatabaseService.java

示例15: createProxy

import io.vertx.codegen.annotations.GenIgnore; //导入依赖的package包/类
@GenIgnore
static com.billyyccc.database.reactivex.BookDatabaseService createProxy(Vertx vertx, String address) {
  return new com.billyyccc.database.reactivex.BookDatabaseService(new BookDatabaseServiceVertxEBProxy(vertx, address));
}
 
开发者ID:BillyYccc,项目名称:vertx-postgresql-starter,代码行数:5,代码来源:BookDatabaseService.java


注:本文中的io.vertx.codegen.annotations.GenIgnore类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。