1 4 package com.tc.net.protocol.tcm; 5 6 import java.util.Date ; 7 8 public class ChannelEventImpl implements ChannelEvent { 9 10 private final ChannelEventType type; 11 private final MessageChannel channel; 12 private final Date timestamp; 13 14 ChannelEventImpl(ChannelEventType type, MessageChannel channel) { 15 this.type = type; 16 this.channel = channel; 17 this.timestamp = new Date (); 18 } 19 20 public String toString() { 21 return getClass().getName() + "@" + System.identityHashCode(this) + "[type=" + this.type + ", timestamp=" + timestamp + ", channel=undisplayed]"; 22 } 23 24 public MessageChannel getChannel() { 25 return channel; 26 } 27 28 public ChannelID getChannelID() { 29 return getChannel().getChannelID(); 30 } 31 32 public Date getTimestamp() { 33 return timestamp; 34 } 35 36 public ChannelEventType getType() { 37 return type; 38 } 39 } | Popular Tags |