Package org.opentcs.access.rmi
Klasse KernelServicePortalBuilder
java.lang.Object
org.opentcs.access.rmi.KernelServicePortalBuilder
Builds
KernelServicePortal
instances for connections to remote portals.-
Konstruktorübersicht
KonstruktorBeschreibungKernelServicePortalBuilder
(String userName, String password) Creates a new instance. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungbuild()
Builds and returns aKernelServicePortal
with the configured parameters.Returns the event filter to be applied for the built portal.Returns the password used for logging in.Returns the socket factory provider used for RMI.Returns the user name used for logging in.setEventFilter
(Predicate<Object> eventFilter) Sets the event filter to be applied for the built portal.setSocketFactoryProvider
(SocketFactoryProvider socketFactoryProvider) Sets the socket factory provider used for RMI.
-
Konstruktordetails
-
KernelServicePortalBuilder
Creates a new instance.- Parameter:
userName
- The user name to use for logging in.password
- The password to use for logging in.
-
-
Methodendetails
-
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
Returns the user name used for logging in.- Gibt zurück:
- The user name used for logging in.
-
getPassword
Returns the password used for logging in.- Gibt zurück:
- The password used for logging in.
-
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
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 aKernelServicePortal
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.
-