io.vertx.servicediscovery.types

## Interface EventBusService

- All Superinterfaces:
    ServiceType

      public interface EventBusService
      extends ServiceType

  `ServiceType` for event bus services (service proxies). Consumers receive a service proxy to use the service.
  Author:
    Clement Escoffier

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `TYPE` Name of the type.

    - ### Fields inherited from interface io.vertx.servicediscovery.spi.ServiceType

      `UNKNOWN`

  - ### Method Summary

    All Methods Static Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Record` | `createRecord(String name, String address, Class itf)` Same as `createRecord(String, String, Class, JsonObject)` but without metadata.
    `static Record` | `createRecord(String name, String address, Class itf, JsonObject metadata)` Sugar method to creates a record for this type.
    `static Record` | `createRecord(String name, String address, String itf, JsonObject metadata)` Sugar method to creates a record for this type.
    `static <T> void` | `getProxy(ServiceDiscovery discovery, Class<T> itf, Handler<AsyncResult<T>> resultHandler)` Lookup for a service record and if found, retrieve it and return the service object (used to consume the service).
    `static <T> void` | `getProxy(ServiceDiscovery discovery, JsonObject filter, Handler<AsyncResult<T>> resultHandler)` Lookup for a service record and if found, retrieve it and return the service object (used to consume the service).
    `static <T> void` | `getProxy(ServiceDiscovery discovery, JsonObject filter, String proxyClass, Handler<AsyncResult<T>> resultHandler)`
    `static <T> void` | `getProxy(ServiceDiscovery discovery, String itf, Handler<AsyncResult<T>> resultHandler)` Lookup for a service record and if found, retrieve it and return the service object (used to consume the service).
    `static <T> void` | `getProxy(ServiceDiscovery discovery, String serviceInterface, String proxyInterface, Handler<AsyncResult<T>> resultHandler)`

    - ### Methods inherited from interface io.vertx.servicediscovery.spi.ServiceType

      `get, name`

- - ### Field Detail

    - #### TYPE

          static final String TYPE

      Name of the type.
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### createRecord

          static Record createRecord(String name,
                                     String address,
                                     Class itf,
                                     JsonObject metadata)

      Sugar method to creates a record for this type.

      The java interface is added to the metadata in the `service.interface` key.

      Parameters:
        `name` - the name of the service.
        `address` - the event bus address on which the service available
        `itf` - the Java interface
        `metadata` - the metadata
      Returns:
        the created record

    - #### createRecord

          static Record createRecord(String name,
                                     String address,
                                     String itf,
                                     JsonObject metadata)

      Sugar method to creates a record for this type.

      The java interface is added to the metadata in the `service.interface` key.

      Parameters:
        `name` - the name of the service.
        `address` - the event bus address on which the service available
        `itf` - the Java interface (name)
        `metadata` - the metadata
      Returns:
        the created record

    - #### createRecord

          static Record createRecord(String name,
                                     String address,
                                     Class itf)

      Same as `createRecord(String, String, Class, JsonObject)` but without metadata.
      Parameters:
        `name` - the name of the service
        `itf` - the Java interface
        `address` - the event bus address on which the service available
      Returns:
        the created record

    - #### getProxy

          static <T> void getProxy(ServiceDiscovery discovery,
                                   JsonObject filter,
                                   Handler<AsyncResult<T>> resultHandler)

      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.
      Type Parameters:
        `T` - the service interface
      Parameters:
        `discovery` - the service discovery instance
        `filter` - the filter to select the service
        `resultHandler` - the result handler

    - #### getProxy

          static <T> void getProxy(ServiceDiscovery discovery,
                                   Class<T> itf,
                                   Handler<AsyncResult<T>> resultHandler)

      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.
      Type Parameters:
        `T` - the service interface
      Parameters:
        `discovery` - the service discovery instance
        `itf` - the service interface
        `resultHandler` - the result handler

    - #### getProxy

          static <T> void getProxy(ServiceDiscovery discovery,
                                   String serviceInterface,
                                   String proxyInterface,
                                   Handler<AsyncResult<T>> resultHandler)

    - #### getProxy

          static <T> void getProxy(ServiceDiscovery discovery,
                                   JsonObject filter,
                                   String proxyClass,
                                   Handler<AsyncResult<T>> resultHandler)

    - #### getProxy

          static <T> void getProxy(ServiceDiscovery discovery,
                                   String itf,
                                   Handler<AsyncResult<T>> resultHandler)

      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.
      Type Parameters:
        `T` - the service interface
      Parameters:
        `discovery` - the service discovery instance
        `itf` - the service interface
        `resultHandler` - the result handler

Copyright © 2016. All rights reserved.