Codota Logo
org.eclipse.hono.service
Code IndexAdd Codota to your IDE (free)

How to use org.eclipse.hono.service

Best Java code snippets using org.eclipse.hono.service (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
FileOutputStream f =
  • Codota IconFile file;new FileOutputStream(file)
  • Codota IconString name;new FileOutputStream(name)
  • Codota IconFile file;new FileOutputStream(file, true)
  • Smart code suggestions by Codota
}
origin: eclipse/hono

/**
 * Register a liveness check procedure which succeeds if
 * the vert.x event loop of this protocol adapter is not blocked.
 *
 * @param handler The health check handler to register the checks with.
 * @see #registerEventLoopBlockedCheck(HealthCheckHandler)
 */
@Override
public void registerLivenessChecks(final HealthCheckHandler handler) {
  registerEventLoopBlockedCheck(handler);
}
origin: eclipse/hono

  /**
   * Registers additional health checks.
   * 
   * @param provider The provider of the health checks.
   */
  protected final void registerHealthchecks(final HealthCheckProvider provider) {
    healthCheckServer.registerHealthCheckResources(provider);
  }
}
origin: eclipse/hono

/**
 * Registers the readiness and liveness checks of the given service.
 * 
 * @param serviceInstance instance of the service which's checks should be registered.
 */
@Override
public void registerHealthCheckResources(final HealthCheckProvider serviceInstance) {
  serviceInstance.registerLivenessChecks(livenessHandler);
  serviceInstance.registerReadinessChecks(readinessHandler);
}
origin: eclipse/hono

private void givenAnAdapterConfiguredWithServiceClients(
    final Handler<Void> startupHandler,
    final Handler<Void> commandConnectionEstablishedHandler,
    final Handler<Void> commandConnectionLostHandler) {
  adapter = newProtocolAdapter(properties, "test", startupHandler,
      commandConnectionEstablishedHandler, commandConnectionLostHandler);
  adapter.setCredentialsServiceClient(credentialsService);
  adapter.setHonoMessagingClient(messagingService);
  adapter.setRegistrationServiceClient(registrationService);
  adapter.setTenantServiceClient(tenantService);
  adapter.setCommandConnection(commandConnection);
}
origin: eclipse/hono

  /**
   * Exposes the health check server as a Spring bean.
   *
   * @return The health check server.
   */
  @Bean
  public HealthCheckServer healthCheckServer() {
    return new VertxBasedHealthCheckServer(vertx(), applicationConfigProperties());
  }
}
origin: org.eclipse.hono/hono-service-base

/**
 * Starts up this service.
 * <ol>
 * <li>Registers an event bus consumer for {@linkplain #getEventBusAddress()
 * the service's event bus request address}.</li>
 * <li>Invokes {@link #doStart(Future)}.</li>
 * </ol>
 *
 * @param startFuture The future to complete on successful startup.
 */
@Override
public final void start(final Future<Void> startFuture) {
  registerConsumer();
  doStart(startFuture);
}
origin: eclipse/hono

/**
 * Adds message properties based on a device's registration information.
 * <p>
 * This methods simply invokes {@link #addProperties(Message, JsonObject, boolean)} with
 * with {@code true} as the value for the regAssertionRequired parameter.
 *
 * @param message The message to set the properties on.
 * @param registrationInfo The values to set.
 * @throws NullPointerException if any of the parameters is {@code null}.
 */
protected final void addProperties(
    final Message message,
    final JsonObject registrationInfo) {
  addProperties(message, registrationInfo, true);
}
origin: eclipse/hono

/**
 * Starts up this component.
 * <ol>
 * <li>invokes {@link #startInternal()}</li>
 * </ol>
 * 
 * @param startFuture Will be completed if all of the invoked methods return a succeeded Future.
 */
@Override
public final void start(final Future<Void> startFuture) {
  healthCheckServer.registerHealthCheckResources(this);
  startInternal().setHandler(startFuture.completer());
}
origin: eclipse/hono

private AbstractProtocolAdapterBase<ProtocolAdapterProperties> newProtocolAdapter(
    final ProtocolAdapterProperties props,
    final String typeName,
    final Handler<Void> startupHandler) {
  return newProtocolAdapter(props, typeName, startupHandler, null, null);
}
origin: org.eclipse.hono/hono-service-base

/**
 * Connects to a Hono Service component using the configured client.
 *
 * @param client The Hono client for the service that is to be connected.
 * @param serviceName The name of the service that is to be connected (used for logging).
 * @return A future that will succeed once the connection has been established. The future will fail if the
 *         connection cannot be established.
 * @throws NullPointerException if serviceName is {@code null}.
 * @throws IllegalArgumentException if client is {@code null}.
 */
protected final Future<HonoClient> connectToService(final HonoClient client, final String serviceName) {
  return connectToService(client, serviceName, onConnect -> {}, onConnectionLost -> {});
}
origin: eclipse/hono

private Future<Void> stopHealthCheckServer() {
  return healthCheckServer.stop();
}
origin: eclipse/hono

@Override
public void setConfig(final ServiceConfigProperties configuration) {
  setSpecificConfig(configuration);
}
origin: eclipse/hono

private static JsonObject newRegistrationAssertionResult(final String token) {
  return newRegistrationAssertionResult(token, null);
}
origin: org.eclipse.hono/hono-service-base

/**
 * Registers the readiness and liveness checks of the given service if health check is configured, otherwise does
 * nothing.
 * 
 * @param serviceInstance instance of the service which's checks should be registered.
 */
public void registerHealthCheckResources(final HealthCheckProvider serviceInstance) {
  if (router != null) {
    serviceInstance.registerLivenessChecks(livenessHandler);
    serviceInstance.registerReadinessChecks(readinessHandler);
  } // else: health check port not configured.
}
origin: eclipse/hono

/**
 * Starts up this service.
 * <ol>
 * <li>Registers an event bus consumer for {@linkplain #getEventBusAddress()
 * the service's event bus request address}.</li>
 * <li>Invokes {@link #doStart(Future)}.</li>
 * </ol>
 *
 * @param startFuture The future to complete on successful startup.
 */
@Override
public final void start(final Future<Void> startFuture) {
  registerConsumer();
  doStart(startFuture);
}
origin: org.eclipse.hono/hono-service-base

/**
 * Adds message properties based on a device's registration information.
 * <p>
 * This methods simply invokes {@link #addProperties(Message, JsonObject, boolean)} with
 * with {@code true} as the value for the regAssertionRequired parameter.
 *
 * @param message The message to set the properties on.
 * @param registrationInfo The values to set.
 * @throws NullPointerException if any of the parameters is {@code null}.
 */
protected final void addProperties(
    final Message message,
    final JsonObject registrationInfo) {
  addProperties(message, registrationInfo, true);
}
origin: eclipse/hono

private AbstractProtocolAdapterBase<ProtocolAdapterProperties> newProtocolAdapter(final ProtocolAdapterProperties props) {
  return newProtocolAdapter(props, ADAPTER_NAME);
}
origin: org.eclipse.hono/hono-service-base

/**
 * Register a liveness check procedure which succeeds if
 * the vert.x event loop of this protocol adapter is not blocked.
 *
 * @param handler The health check handler to register the checks with.
 * @see #registerEventLoopBlockedCheck(HealthCheckHandler)
 */
@Override
public void registerLivenessChecks(final HealthCheckHandler handler) {
  registerEventLoopBlockedCheck(handler);
}
origin: org.eclipse.hono/hono-service-base

  /**
   * Registers additional health checks.
   * 
   * @param provider The provider of the health checks.
   */
  protected final void registerHealthchecks(final HealthCheckProvider provider) {
    healthCheckServer.registerHealthCheckResources(provider);
  }
}
origin: eclipse/hono

/**
 * Connects to a Hono Service component using the configured client.
 *
 * @param client The Hono client for the service that is to be connected.
 * @param serviceName The name of the service that is to be connected (used for logging).
 * @return A future that will succeed once the connection has been established. The future will fail if the
 *         connection cannot be established.
 * @throws NullPointerException if serviceName is {@code null}.
 * @throws IllegalArgumentException if client is {@code null}.
 */
protected final Future<HonoClient> connectToService(final HonoClient client, final String serviceName) {
  return connectToService(client, serviceName, onConnect -> {}, onConnectionLost -> {});
}
org.eclipse.hono.service

Most used classes

  • MetricsTags
    Common definition of metrics tags.
  • UsernamePasswordAuthProvider
    An authentication provider that verifies username/password credentials using Hono's Credentials API.
  • UsernamePasswordCredentials
    Helper class to parse username/password credentials provided by devices during authentication into p
  • HttpUtils
    A collection of utility methods for processing HTTP requests.
  • AmqpEndpoint
    A message endpoint providing an API that clients can interact with by means of AMQP 1.0 based messag
  • AuthTokenHelperImpl,
  • DeviceUser,
  • DeviceCertificateValidator,
  • SubjectDnCredentials,
  • TenantServiceBasedX509Authentication,
  • X509AuthProvider,
  • CredentialsAmqpEndpoint,
  • DefaultFailureHandler,
  • RegistrationAmqpEndpoint,
  • RegistrationAssertionHelperImpl,
  • TenantAmqpEndpoint,
  • AbstractProtocolAdapterBase,
  • AbstractServiceBase,
  • EventBusService
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now