1 7 package org.jboss.remoting.marshall.dynamic.local; 8 9 import org.jboss.dtf.MultipleTestRunner; 10 import org.jboss.remoting.AbstractInvokerTest; 11 import org.jboss.remoting.Client; 12 import org.jboss.remoting.InvokerLocator; 13 14 17 public class MarshallerLoadingClient extends AbstractInvokerTest implements MarshallerLoadingConstants 18 { 19 public MarshallerLoadingClient(String name) 20 { 21 super(name); 22 } 23 24 public MarshallerLoadingClient(String name, int numberOfInstances) 25 { 26 super(name, numberOfInstances); 27 } 28 29 public MarshallerLoadingClient(String name, String transport, int port) 30 { 31 super(name, transport, port); 32 } 33 34 public MarshallerLoadingClient(String name, String transport, int port, int numberOfInstances) 35 { 36 super(name, transport, port, numberOfInstances); 37 } 38 39 public void testInvocation() throws Throwable 40 { 41 InvokerLocator locator = new InvokerLocator(locatorURI); 42 System.out.println("Calling remoting server with locator uri of: " + locatorURI); 43 44 Client remotingClient = new Client(locator, null); 45 Object response = remotingClient.invoke("Do something", null); 46 assertTrue(true); 47 48 System.out.println("Invocation response: " + response); 49 } 50 51 57 public static void main(String [] args) 58 { 59 66 MarshallerLoadingClient client = new MarshallerLoadingClient(MarshallerLoadingClient.class.getName()); 67 68 71 try 72 { 73 MultipleTestRunner runner = new MultipleTestRunner(); 74 runner.doRun(client, true); 75 } 76 catch(Throwable e) 77 { 78 e.printStackTrace(); 79 System.exit(1); 80 } 81 System.exit(0); 82 } 83 84 85 } | Popular Tags |