KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > net > protocol > transport > MockNetworkStackHarness


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.transport;
5
6 import com.tc.net.core.TCConnection;
7 import com.tc.net.protocol.NetworkStackHarness;
8
9
10 public class MockNetworkStackHarness implements NetworkStackHarness {
11   public boolean wasAttachNewConnectionCalled = false;
12   public boolean wasFinalizeStackCalled = false;
13
14   public MessageTransport attachNewConnection(TCConnection connection) {
15     this.wasAttachNewConnectionCalled = true;
16     return null;
17   }
18
19   public void finalizeStack() {
20     this.wasFinalizeStackCalled = true;
21   }
22
23 }
Popular Tags