1 4 package com.tc.net.protocol.tcm; 5 6 import com.tc.async.api.AbstractEventHandler; 7 import com.tc.async.api.EventContext; 8 import com.tc.logging.TCLogger; 9 import com.tc.logging.TCLogging; 10 11 public class HydrateHandler extends AbstractEventHandler { 12 private static TCLogger logger = TCLogging.getLogger(HydrateHandler.class); 13 14 public void handleEvent(EventContext context) { 15 HydrateContext hc = (HydrateContext) context; 16 TCMessage message = hc.getMessage(); 17 18 final MessageChannel channel = message.getChannel(); 19 final ChannelID channelID = channel.getChannelID(); 20 try { 21 message.hydrate(); 22 } catch (Throwable t) { 23 try { 24 logger.error("Error hydrating message of type " + message.getMessageType() + " on channel " + channelID, t); 25 } catch (Throwable t2) { 26 } 28 message.getChannel().close(); 29 return; 30 } 31 hc.getDestSink().add(message); 32 } 33 34 } 35 | Popular Tags |