
org.opentcs.access.rmi.services.RemoteKernelServicePortalProxy Maven / Gradle / Ivy
// SPDX-FileCopyrightText: The openTCS Authors
// SPDX-License-Identifier: MIT
package org.opentcs.access.rmi.services;
import static java.util.Objects.requireNonNull;
import static org.opentcs.access.rmi.services.RegistrationName.REMOTE_DISPATCHER_SERVICE;
import static org.opentcs.access.rmi.services.RegistrationName.REMOTE_KERNEL_CLIENT_PORTAL;
import static org.opentcs.access.rmi.services.RegistrationName.REMOTE_NOTIFICATION_SERVICE;
import static org.opentcs.access.rmi.services.RegistrationName.REMOTE_PERIPHERAL_DISPATCHER_SERVICE;
import static org.opentcs.access.rmi.services.RegistrationName.REMOTE_PERIPHERAL_JOB_SERVICE;
import static org.opentcs.access.rmi.services.RegistrationName.REMOTE_PERIPHERAL_SERVICE;
import static org.opentcs.access.rmi.services.RegistrationName.REMOTE_PLANT_MODEL_SERVICE;
import static org.opentcs.access.rmi.services.RegistrationName.REMOTE_QUERY_SERVICE;
import static org.opentcs.access.rmi.services.RegistrationName.REMOTE_ROUTER_SERVICE;
import static org.opentcs.access.rmi.services.RegistrationName.REMOTE_TRANSPORT_ORDER_SERVICE;
import static org.opentcs.access.rmi.services.RegistrationName.REMOTE_VEHICLE_SERVICE;
import jakarta.annotation.Nonnull;
import java.rmi.NotBoundException;
import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
import java.util.List;
import java.util.function.Predicate;
import org.opentcs.access.CredentialsException;
import org.opentcs.access.Kernel;
import org.opentcs.access.KernelRuntimeException;
import org.opentcs.access.KernelServicePortal;
import org.opentcs.access.rmi.factories.SocketFactoryProvider;
import org.opentcs.components.kernel.services.DispatcherService;
import org.opentcs.components.kernel.services.NotificationService;
import org.opentcs.components.kernel.services.PeripheralDispatcherService;
import org.opentcs.components.kernel.services.PeripheralJobService;
import org.opentcs.components.kernel.services.PeripheralService;
import org.opentcs.components.kernel.services.PlantModelService;
import org.opentcs.components.kernel.services.QueryService;
import org.opentcs.components.kernel.services.RouterService;
import org.opentcs.components.kernel.services.ServiceUnavailableException;
import org.opentcs.components.kernel.services.TransportOrderService;
import org.opentcs.components.kernel.services.VehicleService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* The default implementation for the {@link KernelServicePortal}.
*/
public class RemoteKernelServicePortalProxy
extends
AbstractRemoteServiceProxy
implements
KernelServicePortal,
ServiceListener {
/**
* This class' logger.
*/
private static final Logger LOG = LoggerFactory.getLogger(RemoteKernelServicePortalProxy.class);
/**
* The user name used with the remote portal.
*/
private final String userName;
/**
* The password used with the remote portal.
*/
private final String password;
/**
* Provides socket factories used for RMI.
*/
private final SocketFactoryProvider socketFactoryProvider;
/**
* The event filter to be applied to events on the server side (before polling).
*/
private final Predicate
© 2015 - 2025 Weber Informatics LLC | Privacy Policy