io.vertx.serviceproxy

## Class ProxyHelper

- java.lang.Object
- - io.vertx.serviceproxy.ProxyHelper

-     public class ProxyHelper
      extends Object

  Author:
    Tim Fox

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static long` | `DEFAULT_CONNECTION_TIMEOUT`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ProxyHelper()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <T> T` | `createProxy(Class<T> clazz, Vertx vertx, String address)`
    `static <T> T` | `createProxy(Class<T> clazz, Vertx vertx, String address, DeliveryOptions options)`
    `static <T> MessageConsumer<JsonObject>` | `registerService(Class<T> clazz, Vertx vertx, T service, String address)` Registers a service on the event bus.
    `static <T> MessageConsumer<JsonObject>` | `registerService(Class<T> clazz, Vertx vertx, T service, String address, boolean topLevel, long timeoutSeconds)`
    `static <T> MessageConsumer<JsonObject>` | `registerService(Class<T> clazz, Vertx vertx, T service, String address, long timeoutSeconds)`
    `static void` | `unregisterService(MessageConsumer<JsonObject> consumer)` Unregisters a published service.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT_CONNECTION_TIMEOUT

          public static final long DEFAULT_CONNECTION_TIMEOUT

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### ProxyHelper

          public ProxyHelper()

  - ### Method Detail

    - #### createProxy

          public static <T> T createProxy(Class<T> clazz,
                                          Vertx vertx,
                                          String address)

    - #### createProxy

          public static <T> T createProxy(Class<T> clazz,
                                          Vertx vertx,
                                          String address,
                                          DeliveryOptions options)

    - #### registerService

          public static <T> MessageConsumer<JsonObject> registerService(Class<T> clazz,
                                                                        Vertx vertx,
                                                                        T service,
                                                                        String address)

      Registers a service on the event bus.
      Type Parameters:
        `T` - the type of the service interface
      Parameters:
        `clazz` - the service class (interface)
        `vertx` - the vert.x instance
        `service` - the service object
        `address` - the address on which the service is published
      Returns:
        the consumer used to unregister the service

    - #### registerService

          public static <T> MessageConsumer<JsonObject> registerService(Class<T> clazz,
                                                                        Vertx vertx,
                                                                        T service,
                                                                        String address,
                                                                        long timeoutSeconds)

    - #### registerService

          public static <T> MessageConsumer<JsonObject> registerService(Class<T> clazz,
                                                                        Vertx vertx,
                                                                        T service,
                                                                        String address,
                                                                        boolean topLevel,
                                                                        long timeoutSeconds)

    - #### unregisterService

          public static void unregisterService(MessageConsumer<JsonObject> consumer)

      Unregisters a published service.
      Parameters:
        `consumer` - the consumer returned by `registerService(Class, Vertx, Object, String)`.

Copyright © 2016. All rights reserved.