Klasse KernelServicePortalBuilder

java.lang.Object
org.opentcs.access.rmi.KernelServicePortalBuilder

public class KernelServicePortalBuilder extends Object
Builds KernelServicePortal instances for connections to remote portals.
  • Konstruktordetails

    • KernelServicePortalBuilder

      public KernelServicePortalBuilder(String userName, String password)
      Creates a new instance.
      Parameter:
      userName - The user name to use for logging in.
      password - The password to use for logging in.
  • Methodendetails

    • getSocketFactoryProvider

      public SocketFactoryProvider getSocketFactoryProvider()
      Returns the socket factory provider used for RMI.
      Gibt zurück:
      The socket factory provider used for RMI.
    • setSocketFactoryProvider

      public KernelServicePortalBuilder setSocketFactoryProvider(@Nonnull SocketFactoryProvider socketFactoryProvider)
      Sets the socket factory provider used for RMI.
      Parameter:
      socketFactoryProvider - The socket factory provider.
      Gibt zurück:
      This instance.
    • getUserName

      public String getUserName()
      Returns the user name used for logging in.
      Gibt zurück:
      The user name used for logging in.
    • getPassword

      public String getPassword()
      Returns the password used for logging in.
      Gibt zurück:
      The password used for logging in.
    • getEventFilter

      public Predicate<Object> getEventFilter()
      Returns the event filter to be applied for the built portal.
      Gibt zurück:
      The event filter to be applied for the built portal.
    • setEventFilter

      public KernelServicePortalBuilder setEventFilter(@Nonnull Predicate<Object> eventFilter)
      Sets the event filter to be applied for the built portal.
      Parameter:
      eventFilter - The event filter.
      Gibt zurück:
      This instance.
    • build

      Builds and returns a KernelServicePortal with the configured parameters.
      Gibt zurück:
      A KernelServicePortal instance.
      Löst aus:
      ServiceUnavailableException - If the remote portal is not reachable for some reason.
      CredentialsException - If the client login with the remote portal failed, e.g. because of incorrect login data.