Package org.xmlBlaster.authentication.plugins

Examples of org.xmlBlaster.authentication.plugins.I_MsgSecurityInterceptor


    * @throws XmlBlasterException
    */
   private void exportCrypt(ArrayList holderList, MethodName methodName) throws XmlBlasterException {
      if (holderList == null || methodName == null) return;

      I_MsgSecurityInterceptor securityInterceptor = connectionsHandler.getDispatchManager().getMsgSecurityInterceptor();
      if (securityInterceptor == null) {
         log.warning(ME+": No session security context, sending " + holderList.size() + " messages without encryption");
         return;
      }
      ServerScope scope = (ServerScope)this.glob;

      for (int i=0; i<holderList.size(); i++) {
         Holder holder = (Holder)holderList.get(i);

         // Pass subscribeQos or connectQos - clientProperties to exportMessage() in case there are
         // some interesting settings provided, for example a desired XSL transformation
         SubscriptionInfo subscriptionInfo = null;
         Map map = null;
         if (holder.subscriptionId != null) {
            subscriptionInfo = scope.getRequestBroker().getClientSubscriptions().getSubscription(holder.subscriptionId);
            if (subscriptionInfo != null)
               map = subscriptionInfo.getQueryQosDataClientProperties();
            //String xslFileName = subscriptionInfo.getQueryQosData().getClientProperty("__xslTransformerFileName", (String)null);
         }
         else {
            // todo: use map=ConnectQos.getClientProperties() as a map to pass to dataHolder
         }

         CryptDataHolder dataHolder = new CryptDataHolder(methodName, holder.msgUnitRaw, map);
         holder.msgUnitRaw = securityInterceptor.exportMessage(dataHolder);
      }
      if (log.isLoggable(Level.FINE)) log.fine(ME+": Exported/encrypted " + holderList.size() + " " + methodName + " messages.");
   }
View Full Code Here


            for (int i=0; i < rawReturnVal.length; i++)
               rawReturnVal[i] = bulkReturnValue;
         }

         if (rawReturnVal != null && rawReturnVal.length == raws.length) {
            I_MsgSecurityInterceptor securityInterceptor = connectionsHandler.getDispatchManager().getMsgSecurityInterceptor();
            for (int i=0; i<rawReturnVal.length; i++) {
               MsgQueueUpdateEntry entry = ((Holder)responders.get(i)).msgQueueUpdateEntry;
               if (!entry.wantReturnObj())
                  continue;

               if (securityInterceptor != null) {
                  // decrypt ...
                  CryptDataHolder dataHolder = new CryptDataHolder(MethodName.UPDATE,
                        new MsgUnitRaw(null, (byte[])null, rawReturnVal[i]));
                  dataHolder.setReturnValue(true);
                  rawReturnVal[i] = securityInterceptor.importMessage(dataHolder).getQos();
               }

               // create object
               try {
                  entry.setReturnObj(new UpdateReturnQosServer(glob, rawReturnVal[i]));
View Full Code Here

TOP

Related Classes of org.xmlBlaster.authentication.plugins.I_MsgSecurityInterceptor

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.