/** * The install operation allows a consumer to install the content of a package on the provider. The selected packages will be installed sequencially. * @param names The names field contains the names of the packages. * @param adapter adapter Listener in charge of receiving the messages from the service provider. * @return The acknowledge value of the interaction. * @throws org.ccsds.moims.mo.mal.MALInteractionException if there is a problem during the interaction as defined by the MAL specification. * @throws org.ccsds.moims.mo.mal.MALException if there is an implementation exception. */ public org.ccsds.moims.mo.mal.structures.BooleanList install(org.ccsds.moims.mo.mal.structures.IdentifierList names, org.ccsds.moims.mo.softwaremanagement.packagemanagement.consumer.PackageManagementAdapter adapter) throws org.ccsds.moims.mo.mal.MALInteractionException, org.ccsds.moims.mo.mal.MALException { org.ccsds.moims.mo.mal.transport.MALMessageBody body = consumer.invoke(org.ccsds.moims.mo.softwaremanagement.packagemanagement.PackageManagementHelper.INSTALL_OP, adapter, names); Object body0 = (Object) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.BooleanList()); return (org.ccsds.moims.mo.mal.structures.BooleanList) body0; }
private void publishConfigurationStoredFailure(Long related) { // Publish event: Failure with the objId of the Configuration stored ObjectType objTypeEvent = ConfigurationHelper.CONFIGURATIONSTORED_OBJECT_TYPE; BooleanList bool = new BooleanList(); bool.add(false); // Failure ObjectId eventSource = null; // It was not stored... try { comServices.getEventService().publishEvent( providerURI, null, objTypeEvent, related, eventSource, bool ); } catch (IOException ex) { Logger.getLogger(ConfigurationEventAdapter.class.getName()).log(Level.SEVERE, null, ex); } }
private void publishConfigurationStoredSuccess(Long objId, Long related) { // Publish event: Success with the objId of the Configuration stored ObjectType objTypeEvent = ConfigurationHelper.CONFIGURATIONSTORED_OBJECT_TYPE; BooleanList bool = new BooleanList(); bool.add(true); // Success ObjectId eventSource = new ObjectId(); eventSource.setType(ConfigurationHelper.CONFIGURATIONOBJECTS_OBJECT_TYPE); eventSource.setKey(new ObjectKey(providerDomain, objId)); try { comServices.getEventService().publishEvent( providerURI, objId, objTypeEvent, related, eventSource, bool ); } catch (IOException ex) { Logger.getLogger(ConfigurationEventAdapter.class.getName()).log(Level.SEVERE, null, ex); } }
/** * The listUnitsAvailable operation allows a consumer to request the list of the units available and their respective status. * @param names The names field holds the name of the units. * @return The return value of the interaction. * @throws org.ccsds.moims.mo.mal.MALInteractionException if there is a problem during the interaction as defined by the MAL specification. * @throws org.ccsds.moims.mo.mal.MALException if there is an implementation exception. */ public org.ccsds.moims.mo.platform.powercontrol.body.ListUnitsAvailableResponse listUnitsAvailable(org.ccsds.moims.mo.mal.structures.IdentifierList names) throws org.ccsds.moims.mo.mal.MALInteractionException, org.ccsds.moims.mo.mal.MALException { org.ccsds.moims.mo.mal.transport.MALMessageBody body = consumer.request(org.ccsds.moims.mo.platform.powercontrol.PowerControlHelper.LISTUNITSAVAILABLE_OP, names); Object body0 = (Object) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.LongList()); Object body1 = (Object) body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.BooleanList()); return new org.ccsds.moims.mo.platform.powercontrol.body.ListUnitsAvailableResponse((org.ccsds.moims.mo.mal.structures.LongList) body0, (org.ccsds.moims.mo.mal.structures.BooleanList) body1); }
/** * The listApp operation allows a consumer to request the object instance identifiers of the Apps objects and running status for an app name or for a certain app category. * @param appNames The appNames field contains a list of application names. * @param category The category field contains the category identifier to filter on. * @return The return value of the interaction. * @throws org.ccsds.moims.mo.mal.MALInteractionException if there is a problem during the interaction as defined by the MAL specification. * @throws org.ccsds.moims.mo.mal.MALException if there is an implementation exception. */ public org.ccsds.moims.mo.softwaremanagement.appslauncher.body.ListAppResponse listApp(org.ccsds.moims.mo.mal.structures.IdentifierList appNames, org.ccsds.moims.mo.mal.structures.Identifier category) throws org.ccsds.moims.mo.mal.MALInteractionException, org.ccsds.moims.mo.mal.MALException { org.ccsds.moims.mo.mal.transport.MALMessageBody body = consumer.request(org.ccsds.moims.mo.softwaremanagement.appslauncher.AppsLauncherHelper.LISTAPP_OP, appNames, category); Object body0 = (Object) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.LongList()); Object body1 = (Object) body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.BooleanList()); return new org.ccsds.moims.mo.softwaremanagement.appslauncher.body.ListAppResponse((org.ccsds.moims.mo.mal.structures.LongList) body0, (org.ccsds.moims.mo.mal.structures.BooleanList) body1); }
/** * The findPackage operation allows a consumer to find the available packages on the provider. * @param names The names field contains the names of the packages. * @return The return value of the interaction. * @throws org.ccsds.moims.mo.mal.MALInteractionException if there is a problem during the interaction as defined by the MAL specification. * @throws org.ccsds.moims.mo.mal.MALException if there is an implementation exception. */ public org.ccsds.moims.mo.softwaremanagement.packagemanagement.body.FindPackageResponse findPackage(org.ccsds.moims.mo.mal.structures.IdentifierList names) throws org.ccsds.moims.mo.mal.MALInteractionException, org.ccsds.moims.mo.mal.MALException { org.ccsds.moims.mo.mal.transport.MALMessageBody body = consumer.request(org.ccsds.moims.mo.softwaremanagement.packagemanagement.PackageManagementHelper.FINDPACKAGE_OP, names); Object body0 = (Object) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.IdentifierList()); Object body1 = (Object) body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.BooleanList()); return new org.ccsds.moims.mo.softwaremanagement.packagemanagement.body.FindPackageResponse((org.ccsds.moims.mo.mal.structures.IdentifierList) body0, (org.ccsds.moims.mo.mal.structures.BooleanList) body1); }
/** * The checkPackageIntegrity operation allows a consumer to check the integrity of a certain package on the provider. * @param names The names field contains the names of the packages. * @return The return value of the interaction. * @throws org.ccsds.moims.mo.mal.MALInteractionException if there is a problem during the interaction as defined by the MAL specification. * @throws org.ccsds.moims.mo.mal.MALException if there is an implementation exception. */ public org.ccsds.moims.mo.softwaremanagement.packagemanagement.body.CheckPackageIntegrityResponse checkPackageIntegrity(org.ccsds.moims.mo.mal.structures.IdentifierList names) throws org.ccsds.moims.mo.mal.MALInteractionException, org.ccsds.moims.mo.mal.MALException { org.ccsds.moims.mo.mal.transport.MALMessageBody body = consumer.request(org.ccsds.moims.mo.softwaremanagement.packagemanagement.PackageManagementHelper.CHECKPACKAGEINTEGRITY_OP, names); Object body0 = (Object) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.BooleanList()); Object body1 = (Object) body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.StringList()); return new org.ccsds.moims.mo.softwaremanagement.packagemanagement.body.CheckPackageIntegrityResponse((org.ccsds.moims.mo.mal.structures.BooleanList) body0, (org.ccsds.moims.mo.mal.structures.StringList) body1); }
/** * Called by the MAL when a REQUEST response is received from a provider. * @param msgHeader msgHeader The header of the received message. * @param body body The body of the received message. * @param qosProperties qosProperties The QoS properties associated with the message. * @throws org.ccsds.moims.mo.mal.MALException if an error is detected processing the message. */ public final void requestResponseReceived(org.ccsds.moims.mo.mal.transport.MALMessageHeader msgHeader, org.ccsds.moims.mo.mal.transport.MALMessageBody body, java.util.Map qosProperties) throws org.ccsds.moims.mo.mal.MALException { switch (msgHeader.getOperation().getValue()) { case org.ccsds.moims.mo.softwaremanagement.packagemanagement.PackageManagementHelper._FINDPACKAGE_OP_NUMBER: findPackageResponseReceived(msgHeader, (org.ccsds.moims.mo.mal.structures.IdentifierList) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.IdentifierList()), (org.ccsds.moims.mo.mal.structures.BooleanList) body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.BooleanList()), qosProperties); break; case org.ccsds.moims.mo.softwaremanagement.packagemanagement.PackageManagementHelper._CHECKPACKAGEINTEGRITY_OP_NUMBER: checkPackageIntegrityResponseReceived(msgHeader, (org.ccsds.moims.mo.mal.structures.BooleanList) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.BooleanList()), (org.ccsds.moims.mo.mal.structures.StringList) body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.StringList()), qosProperties); break; default: throw new org.ccsds.moims.mo.mal.MALException("Consumer adapter was not expecting operation number " + msgHeader.getOperation().getValue()); } }
return new BooleanList();
/** * Called by the MAL when a REQUEST response is received from a provider. * @param msgHeader msgHeader The header of the received message. * @param body body The body of the received message. * @param qosProperties qosProperties The QoS properties associated with the message. * @throws org.ccsds.moims.mo.mal.MALException if an error is detected processing the message. */ public final void requestResponseReceived(org.ccsds.moims.mo.mal.transport.MALMessageHeader msgHeader, org.ccsds.moims.mo.mal.transport.MALMessageBody body, java.util.Map qosProperties) throws org.ccsds.moims.mo.mal.MALException { switch (msgHeader.getOperation().getValue()) { case org.ccsds.moims.mo.softwaremanagement.appslauncher.AppsLauncherHelper._LISTAPP_OP_NUMBER: listAppResponseReceived(msgHeader, (org.ccsds.moims.mo.mal.structures.LongList) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.LongList()), (org.ccsds.moims.mo.mal.structures.BooleanList) body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.BooleanList()), qosProperties); break; default: throw new org.ccsds.moims.mo.mal.MALException("Consumer adapter was not expecting operation number " + msgHeader.getOperation().getValue()); } }
/** * Called by the MAL when a REQUEST response is received from a provider. * @param msgHeader msgHeader The header of the received message. * @param body body The body of the received message. * @param qosProperties qosProperties The QoS properties associated with the message. * @throws org.ccsds.moims.mo.mal.MALException if an error is detected processing the message. */ public final void requestResponseReceived(org.ccsds.moims.mo.mal.transport.MALMessageHeader msgHeader, org.ccsds.moims.mo.mal.transport.MALMessageBody body, java.util.Map qosProperties) throws org.ccsds.moims.mo.mal.MALException { switch (msgHeader.getOperation().getValue()) { case org.ccsds.moims.mo.platform.powercontrol.PowerControlHelper._LISTUNITSAVAILABLE_OP_NUMBER: listUnitsAvailableResponseReceived(msgHeader, (org.ccsds.moims.mo.mal.structures.LongList) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.LongList()), (org.ccsds.moims.mo.mal.structures.BooleanList) body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.BooleanList()), qosProperties); break; case org.ccsds.moims.mo.platform.powercontrol.PowerControlHelper._ENABLEUNIT_OP_NUMBER: enableUnitResponseReceived(msgHeader, qosProperties); break; default: throw new org.ccsds.moims.mo.mal.MALException("Consumer adapter was not expecting operation number " + msgHeader.getOperation().getValue()); } }
/** * Called by the MAL when an INVOKE acknowledgement is received from a provider. * @param msgHeader msgHeader The header of the received message. * @param body body The body of the received message. * @param qosProperties qosProperties The QoS properties associated with the message. * @throws org.ccsds.moims.mo.mal.MALException if an error is detected processing the message. */ public final void invokeAckReceived(org.ccsds.moims.mo.mal.transport.MALMessageHeader msgHeader, org.ccsds.moims.mo.mal.transport.MALMessageBody body, java.util.Map qosProperties) throws org.ccsds.moims.mo.mal.MALException { switch (msgHeader.getOperation().getValue()) { case org.ccsds.moims.mo.softwaremanagement.packagemanagement.PackageManagementHelper._INSTALL_OP_NUMBER: installAckReceived(msgHeader, (org.ccsds.moims.mo.mal.structures.BooleanList) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.BooleanList()), qosProperties); break; case org.ccsds.moims.mo.softwaremanagement.packagemanagement.PackageManagementHelper._UNINSTALL_OP_NUMBER: uninstallAckReceived(msgHeader, qosProperties); break; case org.ccsds.moims.mo.softwaremanagement.packagemanagement.PackageManagementHelper._UPGRADE_OP_NUMBER: upgradeAckReceived(msgHeader, qosProperties); break; default: throw new org.ccsds.moims.mo.mal.MALException("Consumer adapter was not expecting operation number " + msgHeader.getOperation().getValue()); } }
final BooleanList integrities = new BooleanList(); final StringList publicKeys = new StringList();
/** * Called by the MAL when a PubSub update is received from a broker. * @param msgHeader msgHeader The header of the received message. * @param body body The body of the received message. * @param qosProperties qosProperties The QoS properties associated with the message. * @throws org.ccsds.moims.mo.mal.MALException if an error is detected processing the message. */ public final void notifyReceived(org.ccsds.moims.mo.mal.transport.MALMessageHeader msgHeader, org.ccsds.moims.mo.mal.transport.MALNotifyBody body, java.util.Map qosProperties) throws org.ccsds.moims.mo.mal.MALException { if ((org.ccsds.moims.mo.platform.PlatformHelper.PLATFORM_AREA_NUMBER.equals(msgHeader.getServiceArea())) && (org.ccsds.moims.mo.platform.gps.GPSHelper.GPS_SERVICE_NUMBER.equals(msgHeader.getService()))) { switch (msgHeader.getOperation().getValue()) { case org.ccsds.moims.mo.platform.gps.GPSHelper._NEARBYPOSITION_OP_NUMBER: nearbyPositionNotifyReceived(msgHeader, (org.ccsds.moims.mo.mal.structures.Identifier) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.Identifier()), (org.ccsds.moims.mo.mal.structures.UpdateHeaderList) body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.UpdateHeaderList()), (org.ccsds.moims.mo.mal.structures.BooleanList) body.getBodyElement(2, new org.ccsds.moims.mo.mal.structures.BooleanList()), qosProperties); break; default: throw new org.ccsds.moims.mo.mal.MALException("Consumer adapter was not expecting operation number " + msgHeader.getOperation().getValue()); } } else { notifyReceivedFromOtherService(msgHeader, body, qosProperties); } }
BooleanList runningApps = new BooleanList();
/** * Called by the provider MAL layer on reception of a message to handle the interaction. * @param interaction interaction the interaction object. * @param body body the message body. * @throws org.ccsds.moims.mo.mal.MALException if there is a internal error. * @throws org.ccsds.moims.mo.mal.MALInteractionException if there is a operation interaction error. */ public void handleInvoke(org.ccsds.moims.mo.mal.provider.MALInvoke interaction, org.ccsds.moims.mo.mal.transport.MALMessageBody body) throws org.ccsds.moims.mo.mal.MALInteractionException, org.ccsds.moims.mo.mal.MALException { switch (interaction.getOperation().getNumber().getValue()) { case org.ccsds.moims.mo.softwaremanagement.packagemanagement.PackageManagementHelper._INSTALL_OP_NUMBER: delegate.install((org.ccsds.moims.mo.mal.structures.IdentifierList) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.IdentifierList()), new InstallInteraction(interaction)); break; case org.ccsds.moims.mo.softwaremanagement.packagemanagement.PackageManagementHelper._UNINSTALL_OP_NUMBER: delegate.uninstall((org.ccsds.moims.mo.mal.structures.IdentifierList) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.IdentifierList()), (org.ccsds.moims.mo.mal.structures.BooleanList) body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.BooleanList()), new UninstallInteraction(interaction)); break; case org.ccsds.moims.mo.softwaremanagement.packagemanagement.PackageManagementHelper._UPGRADE_OP_NUMBER: delegate.upgrade((org.ccsds.moims.mo.mal.structures.IdentifierList) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.IdentifierList()), new UpgradeInteraction(interaction)); break; default: interaction.sendError(new org.ccsds.moims.mo.mal.MALStandardError(org.ccsds.moims.mo.mal.MALHelper.UNSUPPORTED_OPERATION_ERROR_NUMBER, new org.ccsds.moims.mo.mal.structures.Union("Unknown operation"))); } }
/** * Called by the provider MAL layer on reception of a message to handle the interaction. * @param interaction interaction the interaction object. * @param body body the message body. * @throws org.ccsds.moims.mo.mal.MALException if there is a internal error. * @throws org.ccsds.moims.mo.mal.MALInteractionException if there is a operation interaction error. */ public void handleInvoke(org.ccsds.moims.mo.mal.provider.MALInvoke interaction, org.ccsds.moims.mo.mal.transport.MALMessageBody body) throws org.ccsds.moims.mo.mal.MALInteractionException, org.ccsds.moims.mo.mal.MALException { switch (interaction.getOperation().getNumber().getValue()) { case org.ccsds.moims.mo.softwaremanagement.packagemanagement.PackageManagementHelper._INSTALL_OP_NUMBER: install((org.ccsds.moims.mo.mal.structures.IdentifierList) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.IdentifierList()), new InstallInteraction(interaction)); break; case org.ccsds.moims.mo.softwaremanagement.packagemanagement.PackageManagementHelper._UNINSTALL_OP_NUMBER: uninstall((org.ccsds.moims.mo.mal.structures.IdentifierList) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.IdentifierList()), (org.ccsds.moims.mo.mal.structures.BooleanList) body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.BooleanList()), new UninstallInteraction(interaction)); break; case org.ccsds.moims.mo.softwaremanagement.packagemanagement.PackageManagementHelper._UPGRADE_OP_NUMBER: upgrade((org.ccsds.moims.mo.mal.structures.IdentifierList) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.IdentifierList()), new UpgradeInteraction(interaction)); break; default: interaction.sendError(new org.ccsds.moims.mo.mal.MALStandardError(org.ccsds.moims.mo.mal.MALHelper.UNSUPPORTED_OPERATION_ERROR_NUMBER, new org.ccsds.moims.mo.mal.structures.Union("Unknown operation"))); } }
BooleanList valueToBeEnabled = new BooleanList();
BooleanList valueToBeEnabled = new BooleanList();
BooleanList valueToBeEnabled = new BooleanList();