// get and delete old channel instance
IChannel oldInstance=channelTable.get(channelSubscribeId);
channelTable.remove(channelSubscribeId);
rendererTable.remove(channelSubscribeId);
CSecureInfo secureInfoChannel=new CSecureInfo(channelSubscribeId,oldInstance);
if(setRuntimeData) {
ChannelRuntimeData rd=new ChannelRuntimeData();
rd.setBrowserInfo(browserInfo);
if (localeManager != null) {
rd.setLocales(localeManager.getLocales());
}
final PortalControlStructures pcs = this.getPortalControlStructuresForChannel(request, response, channelSubscribeId);
rd.setHttpRequestMethod(pcs.getHttpServletRequest().getMethod());
rd.setRemoteAddress(pcs.getHttpServletRequest().getRemoteAddr());
UPFileSpec up=new UPFileSpec(uPElement);
up.setTargetNodeId(channelSubscribeId);
rd.setUPFile(up);
try {
secureInfoChannel.setRuntimeData(rd);
secureInfoChannel.setPortalControlStructures(pcs);
} catch (Throwable e) {
log.error("Encountered an exception while trying to set runtime data or portal control structures on the secure info channel!", e);
}
}
channelTable.put(channelSubscribeId,secureInfoChannel);