Package org.vertx.java.core.json

Examples of org.vertx.java.core.json.JsonObject


  }

  @Override
  public <T> JsonObject serializeToObject(T object) {
    try {
      return new JsonObject(mapper.writeValueAsString(object));
    } catch (Exception e) {
      throw new SerializationException(e.getMessage());
    }
  }
View Full Code Here


  }

  @Override
  public void put(final K key, final V value, final Handler<AsyncResult<V>> doneHandler) {
    checkAddress();
    JsonObject message = new JsonObject()
        .putString("action", "put")
        .putString("type", "map")
        .putString("name", name)
        .putValue("key", key)
        .putValue("value", value);
View Full Code Here

  }

  @Override
  public void get(final K key, final Handler<AsyncResult<V>> resultHandler) {
    checkAddress();
    JsonObject message = new JsonObject()
        .putString("action", "get")
        .putString("type", "map")
        .putString("name", name)
        .putValue("key", key);
    eventBus.sendWithTimeout(address, message, 30000, new Handler<AsyncResult<Message<JsonObject>>>() {
View Full Code Here

  }

  @Override
  public void remove(final K key, final Handler<AsyncResult<V>> resultHandler) {
    checkAddress();
    JsonObject message = new JsonObject()
        .putString("action", "remove")
        .putString("type", "map")
        .putString("name", name)
        .putValue("key", key);
    eventBus.sendWithTimeout(address, message, 30000, new Handler<AsyncResult<Message<JsonObject>>>() {
View Full Code Here

  }

  @Override
  public void containsKey(final K key, final Handler<AsyncResult<Boolean>> resultHandler) {
    checkAddress();
    JsonObject message = new JsonObject()
        .putString("action", "contains")
        .putString("type", "map")
        .putString("name", name)
        .putValue("key", key);
    eventBus.sendWithTimeout(address, message, 30000, new Handler<AsyncResult<Message<JsonObject>>>() {
View Full Code Here

  }

  @Override
  public void keySet(final Handler<AsyncResult<Set<K>>> resultHandler) {
    checkAddress();
    JsonObject message = new JsonObject()
        .putString("action", "keys")
        .putString("type", "map")
        .putString("name", name);
    eventBus.sendWithTimeout(address, message, 30000, new Handler<AsyncResult<Message<JsonObject>>>() {
      @Override
View Full Code Here

  }

  @Override
  public void values(final Handler<AsyncResult<Collection<V>>> resultHandler) {
    checkAddress();
    JsonObject message = new JsonObject()
        .putString("action", "values")
        .putString("type", "map")
        .putString("name", name);
    eventBus.sendWithTimeout(address, message, 30000, new Handler<AsyncResult<Message<JsonObject>>>() {
      @Override
View Full Code Here

  }

  @Override
  public void size(final Handler<AsyncResult<Integer>> resultHandler) {
    checkAddress();
    JsonObject message = new JsonObject()
        .putString("action", "size")
        .putString("type", "map")
        .putString("name", name);
    eventBus.sendWithTimeout(address, message, 30000, new Handler<AsyncResult<Message<JsonObject>>>() {
      @Override
View Full Code Here

  }

  @Override
  public void isEmpty(final Handler<AsyncResult<Boolean>> resultHandler) {
    checkAddress();
    JsonObject message = new JsonObject()
        .putString("action", "empty")
        .putString("type", "map")
        .putString("name", name);
    eventBus.sendWithTimeout(address, message, 30000, new Handler<AsyncResult<Message<JsonObject>>>() {
      @Override
View Full Code Here

  }

  @Override
  public void clear(final Handler<AsyncResult<Void>> doneHandler) {
    checkAddress();
    JsonObject message = new JsonObject()
        .putString("action", "clear")
        .putString("type", "map")
        .putString("name", name);
    eventBus.sendWithTimeout(address, message, 30000, new Handler<AsyncResult<Message<JsonObject>>>() {
      @Override
View Full Code Here

TOP

Related Classes of org.vertx.java.core.json.JsonObject

Copyright © 2018 www.massapicom. 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.