1 7 package org.jboss.remoting.marshall.dynamic.remote.http; 8 9 import org.apache.log4j.Level; 10 import org.jboss.dtf.MultipleTestRunner; 11 import org.jboss.remoting.AbstractInvokerTest; 12 import org.jboss.remoting.Client; 13 import org.jboss.remoting.InvokerLocator; 14 import org.jboss.remoting.marshall.dynamic.remote.socket.MarshallerLoadingConstants; 15 16 19 public class MarshallerLoadingClient extends AbstractInvokerTest implements MarshallerLoadingConstants 20 { 21 public MarshallerLoadingClient(String name) 22 { 23 super(name); 24 } 25 26 public MarshallerLoadingClient(String name, int numberOfInstances) 27 { 28 super(name, numberOfInstances); 29 } 30 31 public MarshallerLoadingClient(String name, String transport, int port) 32 { 33 super(name, transport, port); 34 } 35 36 public MarshallerLoadingClient(String name, String transport, int port, int numberOfInstances) 37 { 38 super(name, transport, port, numberOfInstances); 39 } 40 41 public void testInvocation() throws Throwable 42 { 43 InvokerLocator locator = new InvokerLocator(locatorURI); 44 System.out.println("Calling remoting server with locator uri of: " + locatorURI); 45 46 Client remotingClient = new Client(locator, null); 47 Object response = remotingClient.invoke("Do something", null); 48 assertTrue(true); 49 50 System.out.println("Invocation response: " + response); 51 } 52 53 59 public static void main(String [] args) 60 { 61 org.apache.log4j.BasicConfigurator.configure(); 62 org.apache.log4j.Category.getRoot().setLevel(Level.INFO); 63 org.apache.log4j.Category.getInstance("org.jboss.remoting").setLevel(Level.DEBUG); 64 65 72 MarshallerLoadingClient client = new MarshallerLoadingClient(MarshallerLoadingClient.class.getName()); 73 try 74 { 75 MultipleTestRunner runner = new MultipleTestRunner(); 76 runner.doRun(client, true); 77 } 78 catch(Throwable e) 79 { 80 e.printStackTrace(); 81 System.exit(1); 82 } 83 System.exit(0); 84 } 85 86 87 } | Popular Tags |