01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright
03: * notice. All rights reserved.
04: */
05: package com.tc.net.protocol.transport;
06:
07: import com.tc.net.TCSocketAddress;
08: import com.tc.net.core.TCConnection;
09: import com.tc.net.protocol.IllegalReconnectException;
10: import com.tc.net.protocol.NetworkLayer;
11: import com.tc.net.protocol.TCNetworkMessage;
12:
13: import java.util.List;
14:
15: /**
16: * Interface for message transport layer-- the connection-side endcap to the message communications stack.
17: */
18: public interface MessageTransport extends NetworkLayer {
19:
20: public ConnectionID getConnectionId();
21:
22: public void addTransportListener(MessageTransportListener listener);
23:
24: public void addTransportListeners(List transportListeners);
25:
26: public void removeTransportListeners();
27:
28: public void attachNewConnection(TCConnection connection)
29: throws IllegalReconnectException;
30:
31: public void receiveTransportMessage(WireProtocolMessage message);
32:
33: public void sendToConnection(TCNetworkMessage message);
34:
35: public TCSocketAddress getRemoteAddress();
36:
37: public TCSocketAddress getLocalAddress();
38:
39: public void setAllowConnectionReplace(boolean allow);
40:
41: }
|