* @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.");
}