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.protocol;
05:
06: import com.tc.bytes.TCByteBuffer;
07: import com.tc.net.MaxConnectionsExceededException;
08: import com.tc.util.TCTimeoutException;
09:
10: import java.io.IOException;
11: import java.net.UnknownHostException;
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()
29: throws MaxConnectionsExceededException, TCTimeoutException,
30: UnknownHostException, IOException;
31:
32: public void close();
33: }
|