KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > net > protocol > NetworkLayer


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;
5
6 import com.tc.bytes.TCByteBuffer;
7 import com.tc.net.MaxConnectionsExceededException;
8 import com.tc.util.TCTimeoutException;
9
10 import java.io.IOException JavaDoc;
11 import java.net.UnknownHostException JavaDoc;
12
13 /**
14  * Generic network layer interface.
15  */

16 public interface NetworkLayer {
17   
18   public void setSendLayer(NetworkLayer layer);
19   
20   public void setReceiveLayer(NetworkLayer layer);
21   
22   public void send(TCNetworkMessage message);
23   
24   public void receive(TCByteBuffer[] msgData);
25   
26   public boolean isConnected();
27
28   public NetworkStackID open() throws MaxConnectionsExceededException, TCTimeoutException, UnknownHostException JavaDoc, IOException JavaDoc;
29   
30   public void close();
31 }
Popular Tags