Package org.opentcs.access.rmi.services
Klasse RemoteKernelServicePortalProxy
java.lang.Object
org.opentcs.access.rmi.services.RemoteKernelServicePortalProxy
- Alle implementierten Schnittstellen:
KernelServicePortal
,ServiceListener
public class RemoteKernelServicePortalProxy
extends Object
implements KernelServicePortal, ServiceListener
The default implementation for the
KernelServicePortal
.-
Konstruktorübersicht
KonstruktorBeschreibungRemoteKernelServicePortalProxy
(String userName, String password, SocketFactoryProvider socketFactoryProvider, Predicate<Object> eventFilter) Creates a new instance. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungfetchEvents
(long timeout) Fetches events buffered for the client.Returns the service a client can use to access methods regarding the dispatcher.Returns the service a client can use to access methods regarding user notifications.Returns the service a client can use to access methods regarding the peripheral dispatcher.Returns the service a client can use to access methods regarding peripheral jobs.Returns the service a client can use to access methods regarding peripherals.Returns the service a client can use to access methods regarding the plant model.Returns the service a client can use to access methods for generic queries.Returns the service a client can use to access methods regarding the router.getState()
Returns the current state of the kernel.Returns the service a client can use to access methods regarding transport orders and order sequences.Returns the service a client can use to access methods regarding vehicles.void
Logs in with/establishes a connection to the remote kernel service portal.void
logout()
Logs out from/clears the connection to the remote kernel service portal.void
Notifies a listener that the service is unavailable, i.e. is not in a usable state.void
publishEvent
(Object event) Publishes an event.org.opentcs.access.rmi.services.AbstractRemoteServiceProxy
<RemoteKernelServicePortal> setServiceListener
(ServiceListener serviceListener) Sets the listener that is interested in updates of this service.
-
Konstruktordetails
-
RemoteKernelServicePortalProxy
public RemoteKernelServicePortalProxy(@Nonnull String userName, @Nonnull String password, @Nonnull SocketFactoryProvider socketFactoryProvider, @Nonnull Predicate<Object> eventFilter) Creates a new instance.- Parameter:
userName
- The user name used with the remote portal.password
- The password used with the remote portal.socketFactoryProvider
- Provides socket factories used for RMI.eventFilter
- The event filter to be applied to events on the server side.
-
-
Methodendetails
-
getServiceListener
-
login
public void login(@Nonnull String hostName, int port) throws CredentialsException, ServiceUnavailableException Beschreibung aus Schnittstelle kopiert:KernelServicePortal
Logs in with/establishes a connection to the remote kernel service portal.- Angegeben von:
login
in SchnittstelleKernelServicePortal
- Parameter:
hostName
- The host on which the remote portal is running.port
- The port at which we can reach the remote RMI registry.- Löst aus:
CredentialsException
ServiceUnavailableException
-
logout
public void logout()Beschreibung aus Schnittstelle kopiert:KernelServicePortal
Logs out from/clears the connection to the remote kernel service portal.- Angegeben von:
logout
in SchnittstelleKernelServicePortal
-
getState
Beschreibung aus Schnittstelle kopiert:KernelServicePortal
Returns the current state of the kernel.- Angegeben von:
getState
in SchnittstelleKernelServicePortal
- Gibt zurück:
- The current state of the kernel.
- Löst aus:
KernelRuntimeException
- In case there is an exception executing this method.
-
fetchEvents
Beschreibung aus Schnittstelle kopiert:KernelServicePortal
Fetches events buffered for the client.- Angegeben von:
fetchEvents
in SchnittstelleKernelServicePortal
- Parameter:
timeout
- A timeout (in ms) for which to wait for events to arrive.- Gibt zurück:
- A list of events (in the order they arrived).
- Löst aus:
KernelRuntimeException
- In case there is an exception executing this method.
-
publishEvent
Beschreibung aus Schnittstelle kopiert:KernelServicePortal
Publishes an event.- Angegeben von:
publishEvent
in SchnittstelleKernelServicePortal
- Parameter:
event
- The event to be published.- Löst aus:
KernelRuntimeException
- In case there is an exception executing this method.
-
getPlantModelService
Beschreibung aus Schnittstelle kopiert:KernelServicePortal
Returns the service a client can use to access methods regarding the plant model.- Angegeben von:
getPlantModelService
in SchnittstelleKernelServicePortal
- Gibt zurück:
- The service a client can use to access methods regarding the plant model.
-
getTransportOrderService
Beschreibung aus Schnittstelle kopiert:KernelServicePortal
Returns the service a client can use to access methods regarding transport orders and order sequences.- Angegeben von:
getTransportOrderService
in SchnittstelleKernelServicePortal
- Gibt zurück:
- The service a client can use to access methods regarding transport orders and order sequences.
-
getVehicleService
Beschreibung aus Schnittstelle kopiert:KernelServicePortal
Returns the service a client can use to access methods regarding vehicles.- Angegeben von:
getVehicleService
in SchnittstelleKernelServicePortal
- Gibt zurück:
- The service a client can use to access methods regarding vehicles.
-
getNotificationService
Beschreibung aus Schnittstelle kopiert:KernelServicePortal
Returns the service a client can use to access methods regarding user notifications.- Angegeben von:
getNotificationService
in SchnittstelleKernelServicePortal
- Gibt zurück:
- The service a client can use to access methods regarding user notifications.
-
getDispatcherService
Beschreibung aus Schnittstelle kopiert:KernelServicePortal
Returns the service a client can use to access methods regarding the dispatcher.- Angegeben von:
getDispatcherService
in SchnittstelleKernelServicePortal
- Gibt zurück:
- The service a client can use to access methods regarding the dispatcher.
-
getRouterService
Beschreibung aus Schnittstelle kopiert:KernelServicePortal
Returns the service a client can use to access methods regarding the router.- Angegeben von:
getRouterService
in SchnittstelleKernelServicePortal
- Gibt zurück:
- The service a client can use to access methods regarding the router.
-
getQueryService
Beschreibung aus Schnittstelle kopiert:KernelServicePortal
Returns the service a client can use to access methods for generic queries.- Angegeben von:
getQueryService
in SchnittstelleKernelServicePortal
- Gibt zurück:
- The service a client can use to access methods for generic queries.
-
getPeripheralService
Beschreibung aus Schnittstelle kopiert:KernelServicePortal
Returns the service a client can use to access methods regarding peripherals.- Angegeben von:
getPeripheralService
in SchnittstelleKernelServicePortal
- Gibt zurück:
- The service a client can use to access methods regarding peripherals.
-
getPeripheralJobService
Beschreibung aus Schnittstelle kopiert:KernelServicePortal
Returns the service a client can use to access methods regarding peripheral jobs.- Angegeben von:
getPeripheralJobService
in SchnittstelleKernelServicePortal
- Gibt zurück:
- The service a client can use to access methods regarding peripheral jobs.
-
getPeripheralDispatcherService
Beschreibung aus Schnittstelle kopiert:KernelServicePortal
Returns the service a client can use to access methods regarding the peripheral dispatcher.- Angegeben von:
getPeripheralDispatcherService
in SchnittstelleKernelServicePortal
- Gibt zurück:
- The service a client can use to access methods regarding the peripheral dispatcher.
-
setServiceListener
public org.opentcs.access.rmi.services.AbstractRemoteServiceProxy<RemoteKernelServicePortal> setServiceListener(ServiceListener serviceListener) Sets the listener that is interested in updates of this service.- Parameter:
serviceListener
- The service listener.- Gibt zurück:
- This remote service proxy.
-