KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > net > protocol > tcm > ChannelEventType


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tc.net.protocol.tcm;
5
6 public class ChannelEventType {
7   public static final ChannelEventType TRANSPORT_DISCONNECTED_EVENT = new ChannelEventType("TRANSPORT_DISCONNCTED_EVENT");
8   public static final ChannelEventType TRANSPORT_CONNECTED_EVENT = new ChannelEventType("TRANSPORT_CONNECTED_EVENT");
9   public static final ChannelEventType CHANNEL_CLOSED_EVENT = new ChannelEventType("CHANNEL_CLOSED_EVENT");
10   public static final ChannelEventType CHANNEL_OPENED_EVENT = new ChannelEventType("CHANNEL_OPENED_EVENT");
11
12   private final String JavaDoc name;
13
14   private ChannelEventType(String JavaDoc name) {
15     this.name = name;
16   }
17
18   public boolean matches(ChannelEvent event) {
19     return event == null ? false : event.getType() == this;
20   }
21
22   public String JavaDoc toString() {
23     return name;
24   }
25 }
Popular Tags