org.ccsds.moims.mo.mal.structures.Union.getStringValue()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(22.7k)|赞(0)|评价(0)|浏览(115)

本文整理了Java中org.ccsds.moims.mo.mal.structures.Union.getStringValue()方法的一些代码示例,展示了Union.getStringValue()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Union.getStringValue()方法的具体详情如下:
包路径:org.ccsds.moims.mo.mal.structures.Union
类名称:Union
方法名:getStringValue

Union.getStringValue介绍

暂无

代码示例

代码示例来源:origin: int.esa.nmf.core/helper-tools

return ((Union) obj).getStringValue();

代码示例来源:origin: int.esa.ccsds.mo/TRANSPORT_GEN

if (null != u)
 final String shortForm = u.getStringValue();
 GENTransport.LOGGER.log(Level.FINER, "GEN Message decoding XML body part : Type = {0}", shortForm);
  final Unmarshaller unmarshaller = jc.createUnmarshaller();
  final String srcString = ((Union) lenc.readElement(new Union(""), null)).getStringValue();
  final StringReader ir = new StringReader(srcString);
  final JAXBElement rootElement = (JAXBElement) unmarshaller.unmarshal(ir);

代码示例来源:origin: int.esa.nmf.core/helper-tools

Double dou;
try {
  dou = Double.parseDouble(((Union) in).getStringValue());
} catch (NumberFormatException ex) {
  return null;  // Return a null

代码示例来源:origin: int.esa.nmf.core/helper-tools

if (((Union) in).getStringValue() == null) {
  return "";
return ((Union) in).getStringValue();

代码示例来源:origin: int.esa.nmf.core.moservices.api/platform

/**
 * The getProperties operation allows a consumer to request the properties of the service and camera. The service shall provide information about the available resolutions, formats and some extra information.
 * @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.camera.body.GetPropertiesResponse getProperties() 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.camera.CameraHelper.GETPROPERTIES_OP, (Object[]) null);
 Object body0 = (Object) body.getBodyElement(0, new org.ccsds.moims.mo.platform.camera.structures.PixelResolutionList());
 Object body1 = (Object) body.getBodyElement(1, new org.ccsds.moims.mo.platform.camera.structures.PictureFormatList());
 Object body2 = (Object) body.getBodyElement(2, new org.ccsds.moims.mo.mal.structures.Union(""));
 return new org.ccsds.moims.mo.platform.camera.body.GetPropertiesResponse((org.ccsds.moims.mo.platform.camera.structures.PixelResolutionList) body0, (org.ccsds.moims.mo.platform.camera.structures.PictureFormatList) body1, (body2 == null) ? null : ((org.ccsds.moims.mo.mal.structures.Union) body2).getStringValue());
}

代码示例来源:origin: int.esa.ccsds.mo/API_COMMON

/**
 * 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 handleRequest(org.ccsds.moims.mo.mal.provider.MALRequest 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.common.login.LoginHelper._LOGIN_OP_NUMBER:
   org.ccsds.moims.mo.common.login.body.LoginResponse loginRt = login((org.ccsds.moims.mo.common.login.structures.Profile) body.getBodyElement(0, new org.ccsds.moims.mo.common.login.structures.Profile()), (body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.Union("")) == null) ? null : ((org.ccsds.moims.mo.mal.structures.Union) body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.Union(""))).getStringValue(), interaction);
   interaction.sendResponse(loginRt.getBodyElement0(), (loginRt.getBodyElement1() == null) ? null : new org.ccsds.moims.mo.mal.structures.Union(loginRt.getBodyElement1()));
   break;
  case org.ccsds.moims.mo.common.login.LoginHelper._LISTROLES_OP_NUMBER:
   interaction.sendResponse(listRoles((org.ccsds.moims.mo.mal.structures.Identifier) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.Identifier()), (body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.Union("")) == null) ? null : ((org.ccsds.moims.mo.mal.structures.Union) body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.Union(""))).getStringValue(), interaction));
   break;
  case org.ccsds.moims.mo.common.login.LoginHelper._HANDOVER_OP_NUMBER:
   org.ccsds.moims.mo.common.login.body.HandoverResponse handoverRt = handover((org.ccsds.moims.mo.common.login.structures.Profile) body.getBodyElement(0, new org.ccsds.moims.mo.common.login.structures.Profile()), (body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.Union("")) == null) ? null : ((org.ccsds.moims.mo.mal.structures.Union) body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.Union(""))).getStringValue(), interaction);
   interaction.sendResponse(handoverRt.getBodyElement0(), (handoverRt.getBodyElement1() == null) ? null : new org.ccsds.moims.mo.mal.structures.Union(handoverRt.getBodyElement1()));
   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")));
 }
}

代码示例来源:origin: int.esa.ccsds.mo/API_COMMON

/**
 * 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 handleRequest(org.ccsds.moims.mo.mal.provider.MALRequest 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.common.login.LoginHelper._LOGIN_OP_NUMBER:
   org.ccsds.moims.mo.common.login.body.LoginResponse loginRt = delegate.login((org.ccsds.moims.mo.common.login.structures.Profile) body.getBodyElement(0, new org.ccsds.moims.mo.common.login.structures.Profile()), (body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.Union("")) == null) ? null : ((org.ccsds.moims.mo.mal.structures.Union) body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.Union(""))).getStringValue(), interaction);
   interaction.sendResponse(loginRt.getBodyElement0(), (loginRt.getBodyElement1() == null) ? null : new org.ccsds.moims.mo.mal.structures.Union(loginRt.getBodyElement1()));
   break;
  case org.ccsds.moims.mo.common.login.LoginHelper._LISTROLES_OP_NUMBER:
   interaction.sendResponse(delegate.listRoles((org.ccsds.moims.mo.mal.structures.Identifier) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.Identifier()), (body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.Union("")) == null) ? null : ((org.ccsds.moims.mo.mal.structures.Union) body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.Union(""))).getStringValue(), interaction));
   break;
  case org.ccsds.moims.mo.common.login.LoginHelper._HANDOVER_OP_NUMBER:
   org.ccsds.moims.mo.common.login.body.HandoverResponse handoverRt = delegate.handover((org.ccsds.moims.mo.common.login.structures.Profile) body.getBodyElement(0, new org.ccsds.moims.mo.common.login.structures.Profile()), (body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.Union("")) == null) ? null : ((org.ccsds.moims.mo.mal.structures.Union) body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.Union(""))).getStringValue(), interaction);
   interaction.sendResponse(handoverRt.getBodyElement0(), (handoverRt.getBodyElement1() == null) ? null : new org.ccsds.moims.mo.mal.structures.Union(handoverRt.getBodyElement1()));
   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")));
 }
}

代码示例来源:origin: int.esa.nmf.core.moservices.api/platform

/**
 * 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.platform.gps.GPSHelper._GETNMEASENTENCE_OP_NUMBER:
   delegate.getNMEASentence((body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.Union("")) == null) ? null : ((org.ccsds.moims.mo.mal.structures.Union) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.Union(""))).getStringValue(), new GetNMEASentenceInteraction(interaction));
   break;
  case org.ccsds.moims.mo.platform.gps.GPSHelper._GETPOSITION_OP_NUMBER:
   delegate.getPosition(new GetPositionInteraction(interaction));
   break;
  case org.ccsds.moims.mo.platform.gps.GPSHelper._GETSATELLITESINFO_OP_NUMBER:
   delegate.getSatellitesInfo(new GetSatellitesInfoInteraction(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")));
 }
}

代码示例来源:origin: int.esa.nmf.core.moservices.api/platform

/**
 * 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.camera.CameraHelper._PREVIEWPICTURE_OP_NUMBER:
   previewPictureResponseReceived(msgHeader, (org.ccsds.moims.mo.platform.camera.structures.Picture) body.getBodyElement(0, new org.ccsds.moims.mo.platform.camera.structures.Picture()), qosProperties);
   break;
  case org.ccsds.moims.mo.platform.camera.CameraHelper._GETPROPERTIES_OP_NUMBER:
   getPropertiesResponseReceived(msgHeader, (org.ccsds.moims.mo.platform.camera.structures.PixelResolutionList) body.getBodyElement(0, new org.ccsds.moims.mo.platform.camera.structures.PixelResolutionList()), (org.ccsds.moims.mo.platform.camera.structures.PictureFormatList) body.getBodyElement(1, new org.ccsds.moims.mo.platform.camera.structures.PictureFormatList()), (body.getBodyElement(2, new org.ccsds.moims.mo.mal.structures.Union("")) == null) ? null : ((org.ccsds.moims.mo.mal.structures.Union) body.getBodyElement(2, new org.ccsds.moims.mo.mal.structures.Union(""))).getStringValue(), qosProperties);
   break;
  default:
   throw new org.ccsds.moims.mo.mal.MALException("Consumer adapter was not expecting operation number " + msgHeader.getOperation().getValue());
 }
}

代码示例来源:origin: int.esa.nmf.core.moservices.api/platform

/**
 * Called by the MAL when an INVOKE 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 invokeResponseReceived(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.gps.GPSHelper._GETNMEASENTENCE_OP_NUMBER:
   getNMEASentenceResponseReceived(msgHeader, (body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.Union("")) == null) ? null : ((org.ccsds.moims.mo.mal.structures.Union) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.Union(""))).getStringValue(), qosProperties);
   break;
  case org.ccsds.moims.mo.platform.gps.GPSHelper._GETPOSITION_OP_NUMBER:
   getPositionResponseReceived(msgHeader, (org.ccsds.moims.mo.platform.gps.structures.Position) body.getBodyElement(0, new org.ccsds.moims.mo.platform.gps.structures.Position()), qosProperties);
   break;
  case org.ccsds.moims.mo.platform.gps.GPSHelper._GETSATELLITESINFO_OP_NUMBER:
   getSatellitesInfoResponseReceived(msgHeader, (org.ccsds.moims.mo.platform.gps.structures.SatelliteInfoList) body.getBodyElement(0, new org.ccsds.moims.mo.platform.gps.structures.SatelliteInfoList()), qosProperties);
   break;
  default:
   throw new org.ccsds.moims.mo.mal.MALException("Consumer adapter was not expecting operation number " + msgHeader.getOperation().getValue());
 }
}

代码示例来源:origin: int.esa.nmf.core.moservices.api/software-management

/**
 * 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.memorymanagement.MemoryManagementHelper._CHECKMEMORY_OP_NUMBER:
   delegate.checkMemory((org.ccsds.moims.mo.mal.structures.Identifier) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.Identifier()), (org.ccsds.moims.mo.mal.structures.UInteger) body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.UInteger()), (org.ccsds.moims.mo.softwaremanagement.memorymanagement.structures.MemoryAreaList) body.getBodyElement(2, new org.ccsds.moims.mo.softwaremanagement.memorymanagement.structures.MemoryAreaList()), (body.getBodyElement(3, new org.ccsds.moims.mo.mal.structures.Union("")) == null) ? null : ((org.ccsds.moims.mo.mal.structures.Union) body.getBodyElement(3, new org.ccsds.moims.mo.mal.structures.Union(""))).getStringValue(), new CheckMemoryInteraction(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")));
 }
}

代码示例来源:origin: int.esa.nmf.core.moservices.api/software-management

/**
 * 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.memorymanagement.MemoryManagementHelper._CHECKMEMORY_OP_NUMBER:
   checkMemory((org.ccsds.moims.mo.mal.structures.Identifier) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.Identifier()), (org.ccsds.moims.mo.mal.structures.UInteger) body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.UInteger()), (org.ccsds.moims.mo.softwaremanagement.memorymanagement.structures.MemoryAreaList) body.getBodyElement(2, new org.ccsds.moims.mo.softwaremanagement.memorymanagement.structures.MemoryAreaList()), (body.getBodyElement(3, new org.ccsds.moims.mo.mal.structures.Union("")) == null) ? null : ((org.ccsds.moims.mo.mal.structures.Union) body.getBodyElement(3, new org.ccsds.moims.mo.mal.structures.Union(""))).getStringValue(), new CheckMemoryInteraction(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")));
 }
}

代码示例来源:origin: int.esa.nmf.core.moservices.api/platform

/**
 * 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.platform.gps.GPSHelper._GETNMEASENTENCE_OP_NUMBER:
   getNMEASentence((body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.Union("")) == null) ? null : ((org.ccsds.moims.mo.mal.structures.Union) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.Union(""))).getStringValue(), new GetNMEASentenceInteraction(interaction));
   break;
  case org.ccsds.moims.mo.platform.gps.GPSHelper._GETPOSITION_OP_NUMBER:
   getPosition(new GetPositionInteraction(interaction));
   break;
  case org.ccsds.moims.mo.platform.gps.GPSHelper._GETSATELLITESINFO_OP_NUMBER:
   getSatellitesInfo(new GetSatellitesInfoInteraction(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")));
 }
}

代码示例来源:origin: int.esa.nmf.core.moservices.api/software-management

/**
 * 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.softwareimage.SoftwareImageHelper._CHECKIMAGEINTEGRITY_OP_NUMBER:
   checkImageIntegrity((org.ccsds.moims.mo.mal.structures.LongList) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.LongList()), (body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.Union("")) == null) ? null : ((org.ccsds.moims.mo.mal.structures.Union) body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.Union(""))).getStringValue(), new CheckImageIntegrityInteraction(interaction));
   break;
  case org.ccsds.moims.mo.softwaremanagement.softwareimage.SoftwareImageHelper._CLONEIMAGE_OP_NUMBER:
   cloneImage((org.ccsds.moims.mo.mal.structures.LongList) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.LongList()), (org.ccsds.moims.mo.mal.structures.IdentifierList) body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.IdentifierList()), new CloneImageInteraction(interaction));
   break;
  case org.ccsds.moims.mo.softwaremanagement.softwareimage.SoftwareImageHelper._PATCHIMAGE_OP_NUMBER:
   patchImage((body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.Union(Long.MAX_VALUE)) == null) ? null : ((org.ccsds.moims.mo.mal.structures.Union) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.Union(Long.MAX_VALUE))).getLongValue(), (body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.Union(Long.MAX_VALUE)) == null) ? null : ((org.ccsds.moims.mo.mal.structures.Union) body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.Union(Long.MAX_VALUE))).getLongValue(), new PatchImageInteraction(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")));
 }
}

代码示例来源:origin: int.esa.nmf.core.moservices.api/software-management

/**
 * 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.softwareimage.SoftwareImageHelper._CHECKIMAGEINTEGRITY_OP_NUMBER:
   delegate.checkImageIntegrity((org.ccsds.moims.mo.mal.structures.LongList) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.LongList()), (body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.Union("")) == null) ? null : ((org.ccsds.moims.mo.mal.structures.Union) body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.Union(""))).getStringValue(), new CheckImageIntegrityInteraction(interaction));
   break;
  case org.ccsds.moims.mo.softwaremanagement.softwareimage.SoftwareImageHelper._CLONEIMAGE_OP_NUMBER:
   delegate.cloneImage((org.ccsds.moims.mo.mal.structures.LongList) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.LongList()), (org.ccsds.moims.mo.mal.structures.IdentifierList) body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.IdentifierList()), new CloneImageInteraction(interaction));
   break;
  case org.ccsds.moims.mo.softwaremanagement.softwareimage.SoftwareImageHelper._PATCHIMAGE_OP_NUMBER:
   delegate.patchImage((body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.Union(Long.MAX_VALUE)) == null) ? null : ((org.ccsds.moims.mo.mal.structures.Union) body.getBodyElement(0, new org.ccsds.moims.mo.mal.structures.Union(Long.MAX_VALUE))).getLongValue(), (body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.Union(Long.MAX_VALUE)) == null) ? null : ((org.ccsds.moims.mo.mal.structures.Union) body.getBodyElement(1, new org.ccsds.moims.mo.mal.structures.Union(Long.MAX_VALUE))).getLongValue(), new PatchImageInteraction(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")));
 }
}

相关文章