Examples of MsgUnitRaw


Examples of org.xmlBlaster.util.MsgUnitRaw

      if (log.isLoggable(Level.FINER)) log.finer("Entering publishOneway()");
      try {
         publishArr(addressServer, sessionId, msgUnitArr);
      }
      catch (Throwable e) {
        MsgUnitRaw msgUnit = (msgUnitArr.length > 0) ? msgUnitArr[0] : null;
        String context = "";
        if (msgUnit != null) context = "key=" + msgUnit.getKey() + " qos=" + msgUnit.getQos();
        log.warning("Caught exception on publishOneway which can't be delivered back to client because of 'oneway' mode '" + context + "', message is lost: " + e.getMessage());
      }
   }
View Full Code Here

Examples of org.xmlBlaster.util.MsgUnitRaw

         // authentication and authorization security checks
         SessionInfo sessionInfo = authenticate.check(sessionId);

         // import (decrypt) and authorize message
         MsgUnit msgUnit = importAndAuthorize(sessionInfo, addressServer,
                                       new MsgUnitRaw(xmlKey_literal, EMPTY_BYTEARR, qos_literal),
                                       MethodName.ERASE);

         EraseQosServer eraseQosServer = new EraseQosServer(glob, (QueryQosData)msgUnit.getQosData());

         // Invoke xmlBlaster
         String [] retArr = requestBroker.erase(sessionInfo, (QueryKeyData)msgUnit.getKeyData(), eraseQosServer);

         sessionInfo.getDispatchStatistic().incrNumErase(1);

         // export (encrypt) return value
         I_Session sec = sessionInfo.getSecuritySession();
         for (int ii=0; ii<retArr.length; ii++) {
            CryptDataHolder dataHolder = new CryptDataHolder(MethodName.ERASE, new MsgUnitRaw(null, (byte[])null, retArr[ii]));
            dataHolder.setReturnValue(true);
            retArr[ii] = sec.exportMessage(dataHolder).getQos();
         }
         return retArr;
      }
View Full Code Here

Examples of org.xmlBlaster.util.MsgUnitRaw

         // authentication and authorization security checks
         SessionInfo sessionInfo = authenticate.check(sessionId);

         // import (decrypt) and authorize message
         MsgUnit msgUnit = importAndAuthorize(sessionInfo, addressServer,
                                   new MsgUnitRaw(xmlKey_literal, EMPTY_BYTEARR, qos_literal),
                                   MethodName.GET);

         // Parse XML key and XML QoS
         GetQosServer getQosServer = new GetQosServer(glob, (QueryQosData)msgUnit.getQosData());
View Full Code Here

Examples of org.xmlBlaster.util.MsgUnitRaw

    * @param MethodName The name of the method which is intercepted
    * @return MsgUnitRaw The original message
    * @exception XmlBlasterException Thrown i.e. if the message has been modified
    */
   public MsgUnitRaw importMessage(CryptDataHolder dataHolder) throws XmlBlasterException {
      MsgUnitRaw msg = dataHolder.getMsgUnitRaw();
      msg = new MsgUnitRaw(msg.getMsgUnit(),
                           importMessage(msg.getKey()),
                           importMessage(msg.getContent()),
                           importMessage(msg.getQos()));

      return msg;
   }
View Full Code Here

Examples of org.xmlBlaster.util.MsgUnitRaw

      return this.msgInfoParserClassName; //XbfParser.class.getName();
   }

   public Object sendEmail(String qos, MethodName methodName,
         boolean expectingResponse) throws XmlBlasterException {
      MsgUnitRaw[] msgArr = { new MsgUnitRaw(null, (byte[])null, qos) };
      return sendEmail(msgArr, methodName,
            expectingResponse);
   }
View Full Code Here

Examples of org.xmlBlaster.util.MsgUnitRaw

            expectingResponse);
   }

   public Object sendEmail(String key, String qos, MethodName methodName,
         boolean expectingResponse) throws XmlBlasterException {
      MsgUnitRaw[] msgArr = { new MsgUnitRaw(key, (byte[])null, qos) };
      return sendEmail(msgArr, methodName,
            expectingResponse);
   }
View Full Code Here

Examples of org.xmlBlaster.util.MsgUnitRaw

    * @param MsgUnitRaw The source message
    * @return MsgUnitRaw
    * @exception XmlBlasterException Thrown if the message cannot be processed
    */
   public MsgUnitRaw exportMessage(CryptDataHolder dataHolder) throws XmlBlasterException {
      MsgUnitRaw msg = dataHolder.getMsgUnitRaw();
      msg = new MsgUnitRaw(msg.getMsgUnit(),
                           exportMessage(msg.getKey()),
                           exportMessage(msg.getContent()),
                           exportMessage(msg.getQos()));

      return msg;

   }
View Full Code Here

Examples of org.xmlBlaster.util.MsgUnitRaw

    * @param MsgUnitRaw The the received message
    * @return MsgUnitRaw The original message
    * @exception XmlBlasterException Thrown i.e. if the message has been modified
    */
   public MsgUnitRaw importMessage(CryptDataHolder dataHolder) throws XmlBlasterException {
      MsgUnitRaw msg = dataHolder.getMsgUnitRaw();

      if (dataHolder.getAction() == null)
         return msg;

      if (dataHolder.getAction().wantsMsgArrArg()) { // PUBLISH
         secMgr.getGUI().printQoS(msg.getQos());
         secMgr.getGUI().printContent(msg.getContentStr());
      }  
     
      msg = new MsgUnitRaw(msg.getMsgUnit(),
                           importMessage(msg.getKey()),
                           importMessage(msg.getContent()),
                           importMessage(msg.getQos()));
  
      if (dataHolder.getAction().wantsMsgArrArg()) {
         secMgr.getGUI().printQoS(msg.getQos());
         secMgr.getGUI().printContent(msg.getContentStr());
      }  
      return msg;
   }
View Full Code Here

Examples of org.xmlBlaster.util.MsgUnitRaw

    * @param MsgUnitRaw The source message
    * @return MsgUnitRaw
    * @exception XmlBlasterException Thrown if the message cannot be processed
    */
   public MsgUnitRaw exportMessage(CryptDataHolder dataHolder) throws XmlBlasterException {
      MsgUnitRaw msg = dataHolder.getMsgUnitRaw();

      if (dataHolder.getAction() == null)
         return msg;

      if (dataHolder.getAction().wantsMsgArrArg()) { // PUBLISH
         secMgr.getGUI().printQoS(msg.getQos());
         secMgr.getGUI().printContent(msg.getContentStr());
      }

      msg = new MsgUnitRaw(msg.getMsgUnit(),
                           exportMessage(msg.getKey()),
                           exportMessage(msg.getContent()),
                           exportMessage(msg.getQos()));

      if (dataHolder.getAction().wantsMsgArrArg()) {
         secMgr.getGUI().printQoS(msg.getQos());
         secMgr.getGUI().printContent(msg.getContentStr());
      }  
      return msg;
   }
View Full Code Here

Examples of org.xmlBlaster.util.MsgUnitRaw

     
      File file = new File(subDir, fileId);
      if (file.exists())
         log.warning("File '" + file.getAbsolutePath() + "' exists already. Will overwrite it");
      FileOutputStream fos = new FileOutputStream(file);
      MsgUnitRaw msgUnitRaw = new MsgUnitRaw(msgUnit.getKey(), msgUnit.getContent(), msgUnit.getQos());
      MsgInfo msgInfo = new MsgInfo(this.global, MsgInfo.INVOKE_BYTE, MethodName.UPDATE_ONEWAY, this.slaveSessionId);
      msgInfo.addMessage(msgUnitRaw);
      XmlScriptParser parser = new XmlScriptParser();
      parser.init(new Global(), null, null);
      fos.write(parser.toLiteral(msgInfo).getBytes());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.