Package net.sf.xbus.technical

Examples of net.sf.xbus.technical.ObjectSender


          // The message is already transformed and must only be
          // retrieved.
          // Structure information for message serialisation is due to
          // the
          // destination system.
          ObjectSender objectsender = (ObjectSender) sender;

          Object resData = objectsender.execute(
              message.getFunction(), ((ObjectMessage) message)
                  .getRequestObject(destination));

          ((ObjectMessage) message).setResponseObject(resData,
              destination);
          message.setResponseTimestamp(new Date());
        }
      }
      else if (Constants.TYPE_XML.equals(senderType))
      {
        boolean sendMessage = true;
        Object request = ((ObjectMessage) message)
            .getRequestObject(destination);
        if (isEmpty(request))
        {
          String onEmpty = retrieveOnEmpty(destination.getName(),
              true);
          if (onEmpty.equals(Constants.READ_IGNORE))
          {
            sendMessage = false;
          }
          else if (onEmpty.equals(Constants.READ_PROCESS))
          {
            sendMessage = true;
          }
          else if (onEmpty.equals(Constants.READ_ERROR))
          {
            throw new XException(Constants.LOCATION_EXTERN,
                Constants.LAYER_APPLICATION,
                Constants.PACKAGE_APPLICATION_ADAPTER, "4");
          }
        }

        if (sendMessage)
        {
          // Send the message to the destination system
          // The message is already transformed and must only be
          // retrieved.
          ObjectSender objectsender = (ObjectSender) sender;

          Document resData = (Document) objectsender.execute(message
              .getFunction(), ((XMLMessage) message)
              .getRequestDocument(destination));

          ((XMLMessage) message).setResponseDocument(resData,
              destination);
View Full Code Here

TOP

Related Classes of net.sf.xbus.technical.ObjectSender

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.