Package net.jini.export

Examples of net.jini.export.Exporter


        private void initCache() throws RemoteException {
            /* Get the exporter for the remote event listener from the
             * configuration.
             */
            try {
                Exporter defaultExporter =
                      new BasicJeriExporter(TcpServerEndpoint.getInstance(0),
                                            new BasicILFactory(),
                                            false, false);
                lookupListenerExporter =
                  (Exporter)thisConfig.getEntry(COMPONENT_NAME,
View Full Code Here


  ProxyTrust proxy;

  public ProxyTrustImpl() {
      try {
    Configuration c = QAConfig.getConfig().getConfiguration();
    Exporter exporter = (Exporter) c.getEntry("test",
                "testLeaseVerifierExporter",
                Exporter.class,
                null);
    if (exporter == null) {
        return; // configuration isn't secure
    }
    proxy = (ProxyTrust) exporter.export(this);
      } catch (Exception e) {
    throw new RuntimeException("Problem creating verifier", e);
      }
  }
View Full Code Here

{
    private String rtn;
    private Object proxy;

    public ARemoteInterfaceImpl(Configuration c, String s) throws RemoteException {
  Exporter exporter = QAConfig.getDefaultExporter();
  if (c instanceof com.sun.jini.qa.harness.QAConfiguration) {
      try {
    exporter = (Exporter) c.getEntry("test",
                   "outriggerListenerExporter",
                   Exporter.class);
      } catch (ConfigurationException e) {
    throw new RemoteException("Bad configuration", e);
      }
  }
  proxy = exporter.export(this);
        rtn = s;
    }
View Full Code Here

             Serializable
    {
        public ServiceEventListener() throws RemoteException {
            super();
      Configuration c = getConfig().getConfiguration();
      Exporter exporter = getConfig().getDefaultExporter();
      if (c instanceof com.sun.jini.qa.harness.QAConfiguration) {
    try {
        exporter = (Exporter) c.getEntry("test",
                 "fiddlerListenerExporter",
                 Exporter.class);
    } catch (ConfigurationException e) {
        throw new RemoteException("Could not find listener exporter", e);
    }
      }
            proxy = exporter.export(this);
        }
View Full Code Here

    /**
     * Create a new TestSpaceListener that dumps to the pasted stream
     */
    TestSpaceListener(Configuration c, Entry tmpl) throws RemoteException {
  try {
      Exporter exporter = QAConfig.getDefaultExporter();
      if (c instanceof com.sun.jini.qa.harness.QAConfiguration) {
    exporter =
    (Exporter) c.getEntry("test", "outriggerListenerExporter", Exporter.class);
      }
      proxy = exporter.export(this);
  } catch (ConfigurationException e) {
      throw new IllegalArgumentException("Bad configuration" + e);
  }
        this.tmpl = tmpl;
    }
View Full Code Here

        /** Simple constructor */
        Listener(Configuration c,
     boolean throwRuntime) throws RemoteException
  {
      try {
    Exporter exporter = QAConfig.getDefaultExporter();
    if (c instanceof com.sun.jini.qa.harness.QAConfiguration) {
        exporter =
        (Exporter) c.getEntry("test", "outriggerListenerExporter", Exporter.class);
    }
    proxy = exporter.export(this);
      } catch (ConfigurationException e) {
    throw new RemoteException("Bad configuration", e);
      }
            this.throwRuntime = throwRuntime;
        }
View Full Code Here

  private Object proxy;

        public BasicEventListener() throws RemoteException {
            super();
      Configuration c = QAConfig.getConfig().getConfiguration();
      Exporter exporter = QAConfig.getDefaultExporter();
      if (c instanceof com.sun.jini.qa.harness.QAConfiguration) {
    try {
        exporter = (Exporter) c.getEntry("test",
                 "fiddlerListenerExporter",
                 Exporter.class);
    } catch (ConfigurationException e) {
        throw new RemoteException("Configuration problem", e);
    }
      }
      proxy = exporter.export(this);
        }
View Full Code Here

        }
    }

    /** Initialization common to both activatable and transient instances. */
    private void doInit(Configuration config) throws Exception {
        Exporter exporter = (Exporter) getNonNullEntry(
            config, "exporter", Exporter.class,
            new BasicJeriExporter(TcpServerEndpoint.getInstance(0),
          new BasicILFactory(),
          false,
          true));
        // Export server instance and get its reference
        serverStub = exporter.export(this);
    }
View Full Code Here

  }

  owners = new LeaseOwner[leaseCount];
  leases = new TestLease[leaseCount];
  Configuration c = QAConfig.getConfig().getConfiguration();
  Exporter exporter = QAConfig.getDefaultExporter();
  if (c instanceof com.sun.jini.qa.harness.QAConfiguration) {
      try {
    exporter = (Exporter) c.getEntry("test",
             "leaseExporter",
             Exporter.class);
      } catch (ConfigurationException e) {
    throw new RemoteException("Configuration error", e);
      }
  }
  LeaseBackEnd stub =
      (LeaseBackEnd) exporter.export(this);

  // create the lease factory
  try {
      Class[] args = new Class[] { LeaseBackEnd.class };
      Constructor constr = factoryClass.getConstructor(args);
View Full Code Here

    /** Initialization common to both activatable and transient instances. */
    private void doInit(Configuration config) throws Exception {
        uuid = net.jini.id.UuidFactory.generate();

        Exporter exporter = (Exporter) Config.getNonNullEntry(
            config, TEST_SERVICE, "exporter", Exporter.class,
            new BasicJeriExporter(
                TcpServerEndpoint.getInstance(0), new BasicILFactory(), false, true));
        System.out.println("service exporter is: "
            +  exporter);
        // Export server instance and get its reference
        serverStub = (TestService)exporter.export(this);
        System.out.println("Service stub is: " + serverStub);
       
        // Store class loader ref in shared map
        TestServiceSharedMap.storeClassLoader(
            uuid, this.getClass().getClassLoader());
View Full Code Here

TOP

Related Classes of net.jini.export.Exporter

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.