1 9 package org.jboss.test.remoting.transport.mock; 10 11 import java.io.IOException ; 12 import java.util.Map ; 13 import org.jboss.remoting.ConnectionFailedException; 14 import org.jboss.remoting.InvokerLocator; 15 import org.jboss.remoting.RemoteClientInvoker; 16 import org.jboss.remoting.marshal.Marshaller; 17 import org.jboss.remoting.marshal.UnMarshaller; 18 19 25 public class MockClientInvoker extends RemoteClientInvoker 26 { 27 private final MockServerInvoker server; 28 private boolean loaded = false; 29 30 public MockClientInvoker(InvokerLocator locator, MockServerInvoker server) 31 { 32 super(locator); 33 this.server = server; 34 } 35 36 44 protected void handleConnect() 45 throws ConnectionFailedException 46 { 47 } 48 49 55 protected void handleDisconnect() 56 { 57 } 58 59 60 public void connect() 61 throws ConnectionFailedException 62 { 63 } 64 65 public void disconnect() 66 { 67 } 68 69 protected String getDefaultDataType() 70 { 71 return null; 72 } 73 74 public boolean isConnected() 75 { 76 return false; 77 } 78 79 protected Object transport(String sessionId, Object invocation, Map metadata, Marshaller marshaller, UnMarshaller unmarshaller) 80 throws IOException , ConnectionFailedException 81 { 82 return server.invoke(invocation); 83 } 84 } 85 | Popular Tags |