org.opentcs.access.rmi.KernelServicePortalBuilder Maven / Gradle / Ivy
/**
* Copyright (c) The openTCS Authors.
*
* This program is free software and subject to the MIT license. (For details,
* see the licensing information (LICENSE.txt) you should have received with
* this copy of the software.)
*/
package org.opentcs.access.rmi;
import static java.util.Objects.requireNonNull;
import java.util.function.Predicate;
import javax.annotation.Nonnull;
import org.opentcs.access.CredentialsException;
import org.opentcs.access.KernelServicePortal;
import org.opentcs.access.rmi.factories.NullSocketFactoryProvider;
import org.opentcs.access.rmi.factories.SocketFactoryProvider;
import org.opentcs.access.rmi.services.RemoteKernelServicePortalProxy;
import org.opentcs.components.kernel.services.ServiceUnavailableException;
import org.opentcs.util.ClassMatcher;
/**
* Builds {@link KernelServicePortal} instances for connections to remote portals.
*
* @author Martin Grzenia (Fraunhofer IML)
*/
public class KernelServicePortalBuilder {
/**
* Provides socket factories used for RMI.
*/
private SocketFactoryProvider socketFactoryProvider = new NullSocketFactoryProvider();
/**
* The user name for logging in.
*/
private final String userName;
/**
* The password for logging in.
*/
private final String password;
/**
* The event filter to be applied for the built portal.
*/
private Predicate
© 2015 - 2025 Weber Informatics LLC | Privacy Policy