ControlUnitProxy service
for management of system control units.See: Description
| Interface | Description |
|---|---|
| BackendControlUnitProxyFactory |
Factory service for creating
ControlUnitProxy instance for management of system control units. |
ControlUnitProxy service
for management of system control units.
The functionality provided by this package is available through the methods of the BackendControlUnitProxyFactory class and it can be accessed in two ways:
|
import com.prosyst.mprm.admin.systemcu.BackendControlUnitProxyFactory; import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceReference; ..... public BackendControlUnitProxyFactory getBackendControlUnitProxyFactory(BundleContext context) { BackendControlUnitProxyFactory cupFactory = null; ServiceReference cupRef = context.getServiceReference(BackendControlUnitProxyFactory.class.getName()); if (cupRef != null) { cupFactory = (BackendControlUnitProxyFactory)context.getService(cupRef); } return cupFactory; } ..... |
com.prosyst.mprm.rac.RemoteAccessClient. An external stand-alone application can use this package by including system-rac.jar in its classpath.
|
import com.prosyst.mprm.admin.systemcu.BackendControlUnitProxyFactory; import com.prosyst.mprm.rac.RemoteAccessClient; import java.util.Hashtable; ..... public BackendControlUnitProxyFactory getBackendControlUnitProxyFactory(RemoteAccessClient rac) { BackendControlUnitProxyFactory getBackendControlUnitProxyFactory cupFactory = null; if (rac != null) { cupFactory = (BackendControlUnitProxyFactory)rac.getService(BackendControlUnitProxyFactory.class.getName()); } return cupFactory; } ..... public static void main(String[] args) { //Open session using the system account. Hashtable credentials = new Hashtable(); credentials.put(RemoteAccessClient.USER_PASSWORD, "system"); RemoteAccessClient rac = RemoteAccessClient.connect("socket://mprm.acme.com:11449", "system", credentials, null); ... //Now the application can access mPRM BackendControlUnitProxyFactory service BackendControlUnitProxyFactory cupFactory = getBackendControlUnitProxyFactory(rac); ... //closing session rac.close(); } ..... |
Copyright © 2019 Bosch Software Innovations GmbH. All Rights Reserved.