01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc.net.core;
05:
06: import com.tc.net.TCSocketAddress;
07: import com.tc.net.core.event.TCListenerEventListener;
08: import com.tc.util.TCTimeoutException;
09:
10: import java.net.InetAddress;
11:
12: /**
13: * A handle to a network listening port
14: *
15: * @author teck
16: */
17: public interface TCListener {
18: public void stop();
19:
20: public void stop(long timeout) throws TCTimeoutException;
21:
22: public int getBindPort();
23:
24: public InetAddress getBindAddress();
25:
26: public TCSocketAddress getBindSocketAddress();
27:
28: public void addEventListener(TCListenerEventListener lsnr);
29:
30: public void removeEventListener(TCListenerEventListener lsnr);
31:
32: public boolean isStopped();
33: }
|