Package net.jini.jeri

Examples of net.jini.jeri.BasicILFactory


        //Register for instrumentation calls from the transport
        ConnectionTransportListener.registerListener(this);
        //initiate a listen operation
        TestServerEndpoint tse = new TestServerEndpoint(getListenPort());
        BasicJeriExporter exporter =
            new BasicJeriExporter(tse, new BasicILFactory());
        TestServiceImpl service = new TestServiceImpl();
        TestService stub = (TestService) exporter.export(service);
        TestEndpoint te = tse.getTestEndpoint();
        //make a call
        stub.doSomething();
View Full Code Here


    public void run() throws Exception {
        //Register for instrumentation calls from the transport
        ConnectionTransportListener.registerListener(this);
        //initiate a listen operation
        BasicJeriExporter exporter = new BasicJeriExporter(
        new TestServerEndpoint(getListenPort()), new BasicILFactory());
        TestServiceImpl service = new TestServiceImpl();
        TestService stub = (TestService) exporter.export(service);
        //send a request and receive a response
        stub.doSomething();
        //Verify that checkPermissions is called
View Full Code Here

        Thread t = new Thread(rd);
        t.start();
        ((TestServerEndpoint) se).redirect(getPort() + 1);
        TestService service = new TestServiceImpl();
        BasicJeriExporter exporter = new BasicJeriExporter(se,
            new BasicILFactory());
        TestService stub = (TestService) exporter.export(service);
        //Obtain a message to send for the test
        byte[] ball = new byte[800];
        Arrays.fill(ball, (byte)0x88);
        stub.bounce(ball);
View Full Code Here


public class TestServerEndpointTest {
    public static void main(String[] args) {
        BasicJeriExporter exporter = new BasicJeriExporter(
            new TestServerEndpoint(9090), new BasicILFactory());
        TestServiceImpl service = new TestServiceImpl();
        try {
            TestService stub = (TestService)
                exporter.export(service);
            System.out.println("Result of remote call: " + stub.doSomething());
View Full Code Here

            super();
        }

        WatchDataReplicator getWatchDataReplicator() throws ExportException {
            exporter = new BasicJeriExporter(TcpServerEndpoint.getInstance(0),
                                             new BasicILFactory(),
                                             false,
                                             true);
            RemoteWatchDataReplicator backend = (RemoteWatchDataReplicator)exporter.export(this);
            return WatchDataReplicatorProxy.getInstance(backend, UUID.randomUUID());
        }
View Full Code Here

        Exporter exporter = (Exporter)config.getEntry(component, entry, Exporter.class, null);
        if(exporter==null) {
            exporter = (Exporter)config.getEntry(DEFAULT_COMPONENT, ENTRY_NAME, Exporter.class, null);
            if(exporter==null) {
                try {
                    exporter = new BasicJeriExporter(getServerEndpoint(), new BasicILFactory(), false, true);
                } catch (UnknownHostException e) {
                    logger.warn("Unable to get host address, defaulting to localhost", e);
                    exporter = new BasicJeriExporter(TcpServerEndpoint.getInstance(0), new BasicILFactory(), false, true);
                }
            }
        }
        if(logger.isTraceEnabled())
            logger.trace(String.format("Created %s for %s.%s", exporter, component, entry));
View Full Code Here

            if(listener==null) {
                exporter  = ExporterConfig.getExporter(config,
                                                       "org.rioproject.cybernode",
                                                       "exporter");
                if(exporter==null)
                    exporter = new BasicJeriExporter(ExporterConfig.getServerEndpoint(), new BasicILFactory());
                listener = (ServiceBeanExecListener)exporter.export(this);
            }
            return listener;
        }
View Full Code Here

        EventHandler eventHandler;
        long leaseTime = 30*1000;

        Producer() throws Exception {
            Exporter exporter = new BasicJeriExporter(TcpServerEndpoint.getInstance(0),
                                                      new BasicILFactory(),
                                                      false,
                                                      true);
            remote = exporter.export(this);
            landlordLessor = new LandlordLessor(EmptyConfiguration.INSTANCE);
        }
View Full Code Here

            Exporter defaultExporter = (Exporter)config.getEntry(RIO_CONFIG_COMPONENT,
                                                                 DEFAULT_EXPORTER,
                                                                 Exporter.class,
                                                                 null);
            if(defaultExporter==null)
                defaultExporter = new BasicJeriExporter(ExporterConfig.getServerEndpoint(), new BasicILFactory());
            logger.trace("{} has been set as the defaultExporter", defaultExporter);
        } catch(Exception e) {
            logger.error("The {}.{} attribute must be set", RIO_CONFIG_COMPONENT, DEFAULT_EXPORTER);
            throw e;
        }
View Full Code Here

     */
     public ServiceProvisionNotification(Configuration config)
     throws ConfigurationException, ExportException {
         Exporter defaultExporter =
             new BasicJeriExporter(TcpServerEndpoint.getInstance(0),
                                   new BasicILFactory(),
                                   false,
                                   true);
         exporter = (Exporter)config.getEntry("org.rioproject.tools.cli",
                                              "provisionListenerExporter",
                                              Exporter.class,
View Full Code Here

TOP

Related Classes of net.jini.jeri.BasicILFactory

Copyright © 2018 www.massapicom. 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.