KickJava   Java API By Example, From Geeks To Geeks.

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


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
8 import java.util.List JavaDoc;
9
10 public class MockMessageTransportFactory implements MessageTransportFactory {
11
12   public MessageTransport transport;
13   public int callCount;
14
15   public MessageTransport createNewTransport() {
16     callCount++;
17     return transport;
18   }
19
20   public MessageTransport createNewTransport(ConnectionID connectionID, TransportHandshakeErrorHandler handler,
21                                              TransportHandshakeMessageFactory handshakeMessageFactory, List JavaDoc transportListeners) {
22     callCount++;
23     return transport;
24   }
25
26   public MessageTransport createNewTransport(ConnectionID connectionId, TCConnection connection,
27                                              TransportHandshakeErrorHandler handler,
28                                              TransportHandshakeMessageFactory handshakeMessageFactory, List JavaDoc transportListeners) {
29     callCount++;
30     return transport;
31   }
32 }
33
Popular Tags