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