All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.scalecube.services.ServiceRegistration Maven / Gradle / Ivy

package io.scalecube.services;

import java.util.Collection;
import java.util.Map;

public class ServiceRegistration {

  private String namespace;
  private Map tags;
  private Collection methods;

  /**
   * Constructor for SerDe.
   *
   * @deprecated exposed only for de/serialization purpose.
   */
  public ServiceRegistration() {}

  /**
   * Create a new service registration.
   *
   * @param namespace the namespace to use
   * @param tags tags
   * @param methods a collection of service method definitions
   */
  public ServiceRegistration(
      String namespace, Map tags, Collection methods) {
    this.namespace = namespace;
    this.tags = tags;
    this.methods = methods;
  }

  public String namespace() {
    return namespace;
  }

  public Map tags() {
    return tags;
  }

  public Collection methods() {
    return methods;
  }

  public ServiceRegistration setTags(Map tags) {
    this.tags = tags;
    return this;
  }

  @Override
  public String toString() {
    return "ServiceRegistration{"
        + "namespace='"
        + namespace
        + '\''
        + ", tags="
        + tags
        + ", methods="
        + methods
        + '}';
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy