MsgQueueUnSubscribeEntry unSubscribeEntry = (MsgQueueUnSubscribeEntry)entry;
String key = unSubscribeEntry.getUnSubscribeKey().toXml();
String qos = unSubscribeEntry.getUnSubscribeQos().toXml();
if (securityInterceptor != null) { // We export/encrypt the message (call the interceptor)
CryptDataHolder dataHolder = new CryptDataHolder(MethodName.UNSUBSCRIBE, new MsgUnitRaw(key, (byte[])null, qos));
MsgUnitRaw msgUnitRaw = securityInterceptor.exportMessage(dataHolder);
key = msgUnitRaw.getKey();
qos = msgUnitRaw.getQos();
if (log.isLoggable(Level.FINE)) log.fine("Exported/encrypted unSubscribe request.");
}
else {
log.warning("No session security context, unSubscribe request is not encrypted");
}
String[] rawReturnValArr = this.driver.unSubscribe(key, qos); // Invoke remote server
connectionsHandler.getDispatchStatistic().incrNumUnSubscribe(1);
if (unSubscribeEntry.wantReturnObj()) {
UnSubscribeReturnQos[] retQosArr = new UnSubscribeReturnQos[rawReturnValArr.length];
for (int ii=0; ii<rawReturnValArr.length; ii++) {
if (securityInterceptor != null) { // decrypt return value ...
CryptDataHolder dataHolder = new CryptDataHolder(MethodName.UNSUBSCRIBE, new MsgUnitRaw(null, (byte[])null, rawReturnValArr[ii]));
dataHolder.setReturnValue(true);
String xmlQos = securityInterceptor.importMessage(dataHolder).getQos();
retQosArr[ii] = new UnSubscribeReturnQos(glob, xmlQos);
}
}