Package net.jini.jeri

Examples of net.jini.jeri.BasicJeriExporter.export()


        BasicJeriTrustVerifier verifier = new BasicJeriTrustVerifier();
        Integer port = new Integer(getStringValue("listenPort"));
        BasicJeriExporter exporter = new BasicJeriExporter(
            TcpServerEndpoint.getInstance(port.intValue()),
      new BasicILFactory());
        Remote stub = exporter.export(new TestServiceImpl());
  exporter.unexport(true);
        ClassLoader loader = Thread.currentThread().getContextClassLoader();
        TestTrustVerifierCtx ctx = new TestTrustVerifierCtx(
            true, loader);
        if (!verifier.isTrustedObject(stub, ctx)){
View Full Code Here


        ((TestServerEndpoint) se).redirect(redirectPort);
        Thread t = new Thread(rd);
        t.start();
        BasicJeriExporter exporter = new BasicJeriExporter(se,
            new BasicILFactory());
        TestService stub = (TestService) exporter.export(service);
        //Connect to the mux server
        Socket s = new Socket(getHost(),getPort());
        InputStream is = s.getInputStream();
        OutputStream os = s.getOutputStream();
        //Send client connection header
View Full Code Here

        //is included
        se = getServerEndpoint();
        service = new TestServiceImpl();
        exporter = new BasicJeriExporter(se,
            new BasicILFactory());
        stub = (TestService) exporter.export(service);
        //Connect to the mux server
        s = new Socket(getHost(),getPort());
        is = s.getInputStream();
        os = s.getOutputStream();
        PingAckMessage pam = new PingAckMessage().setCookie((short)0x5544);
View Full Code Here

      public void run() {
    Exporter exporter =
        new BasicJeriExporter(new BlockingListenServerEndpoint(),
            new BasicILFactory(), false, false);
    try {
        exporter.export(new Remote() { });
    } catch (ExportException e) {
        throw new Error(e);
    }
      }
  });
View Full Code Here

      }
  }
  Exporter exporter =
      new BasicJeriExporter(TcpServerEndpoint.getInstance(0),
          new BasicILFactory(), false, false);
  exporter.export(new Remote() { });
  exporter.unexport(true);
  System.err.println("TEST PASSED");
    }

    private static class BlockingListenServerEndpoint
View Full Code Here

            new TestServerEndpoint(), new BJETestILFactory());

        BJETestServiceImpl service = new BJETestServiceImpl();
        //export a remote object using the exporter
        try {
            exporter.export(service);
            //call the unexport method with the force flag set to false
            boolean result = exporter.unexport(false);
            if (result) {
                //verify that close was called on the server endpoint
                if (closeCalled) {
View Full Code Here

            new TestServerEndpoint(),
                new BJETestILFactory());
        //export a remote object using the exporter
        BJETestServiceImpl service = new BJETestServiceImpl();
        try {
            exporter.export(service);
            //call the unexport method with the force flag set to true
            boolean result = exporter.unexport(true);
            if (result) {
                //verify that close was called on the server endpoint
                if (closeCalled) {
View Full Code Here

                new BJETestILFactory());
        //export a remote object using the exporter
        BJETestServiceImpl service = new BJETestServiceImpl();
        try {
            final BJETestService stub = (BJETestService)
                exporter.export(service);
            //make a blocking call on the server
            Thread t = new Thread(new Runnable() {
                public void run(){
                    try {
                        stub.doSomethingLong();
View Full Code Here

            + ".basicjeriexporter.listenPort", 9090);
        BasicJeriExporter exporter = new BasicJeriExporter(
            TcpServerEndpoint.getInstance(listenPort), new BJETestILFactory());
        try {
            //Call the export method passing null as the argument
            exporter.export(null);
            throw new TestException( "Passing null as argument"
                + " to the export method did not result in an exception being"
                + " thrown");
        } catch (ExportException e) {
            log.finer("Unexpected exception in call to export " +
View Full Code Here

                new BJETestILFactory());
        //export a remote object using the exporter
        BJETestServiceImpl service = new BJETestServiceImpl();
        try {
            final BJETestService stub = (BJETestService)
                exporter.export(service);
            //make a blocking call on the server
            Thread t = new Thread(new Runnable() {
                public void run(){
                    try {
                        stub.doSomethingLong();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.