Package net.jini.config

Examples of net.jini.config.Configuration


              locatorsToDiscover,
              listener,
              mHandback,
              leaseDuration)
      logger.log(Level.FINEST, "Preparing fiddler registration");
      Configuration c = config.getConfiguration();
      ProxyPreparer p = new BasicProxyPreparer();
      if (c instanceof com.sun.jini.qa.harness.QAConfiguration) {
      p = (ProxyPreparer) c.getEntry("test",
                 "fiddlerRegistrationPreparer",
                 ProxyPreparer.class);
      }
      registrationMap.put(p.prepareProxy(ldsReg),listener);
  } catch (ConfigurationException e) {
View Full Code Here


     * @return the prepared lease
     */
    protected Lease getPreparedLease(LookupDiscoveryRegistration reg)
  throws RemoteException
    {
  Configuration c = config.getConfiguration();
  if (!(c instanceof com.sun.jini.qa.harness.QAConfiguration)) { // if none configuration
      return reg.getLease();
  }
  try {
      ProxyPreparer p = (ProxyPreparer) c.getEntry("test",
               "fiddlerLeasePreparer",
               ProxyPreparer.class);
      Lease l = reg.getLease();
      logger.log(Level.FINEST, "Returning prepared fiddler lease");
      return (Lease) p.prepareProxy(l);
View Full Code Here

             ServerProxyTrust,
             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);
    }
View Full Code Here

import net.jini.config.ConfigurationException;
import net.jini.config.EmptyConfiguration;

public class ServiceStarterCreateEmptyTest extends ServiceStarterCreateBaseTest {
    public void run() throws Exception {
  Configuration config = EmptyConfiguration.INSTANCE;
  Object[] params = new Object[] {new ServiceDescriptor[] {}, config};

        Object[] results = (Object[])getCreateMethod().invoke(null, params);
  if (results.length != 0) {
      throw new TestException("Failed -- parsed empty config");
View Full Code Here

    }

    public void run() throws Exception {
        specifyServices(new Class[] {
            JavaSpace.class});
  Configuration c = getConfig().getConfiguration();
        final Listener listener1 = new Listener(c, true);
        final Listener listener2 = new Listener(c, false);
        final JavaSpace space = (JavaSpace) services[0];
        final Entry aEntry = new UninterestingEntry();
View Full Code Here

     null, null, sg);
   }
    }

    public void run() throws Exception {
  Configuration config = EmptyConfiguration.INSTANCE;
  // Create bogus data
  ServiceDescriptor[] descs = new ServiceDescriptor[] {
      new MyBogusServiceDescriptor(),
      new MyBogusServiceDescriptor2("http://a/", "a", "a", "a", "a",
    null, false),
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);
    }
View Full Code Here

    public BadServiceProxyAccessorImpl(
  String[] configArgs, ActivationID activationID,
  LifeCycle lifeCycle)
  throws Exception
    {
        final Configuration config =
            ConfigurationProvider.getInstance(configArgs);
        LoginContext loginContext = (LoginContext) config.getEntry(
            BAD_SPA, "loginContext", LoginContext.class, null);
        if (loginContext != null) {
            doInitWithLogin(config, loginContext);
        } else {
            doInit(config);
View Full Code Here

              new IllegalArgumentException(message));
  }

  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);
      }
View Full Code Here

            throw new TestException("the service under test "
                                      +"does not implement the "
                                      +"com.sun.jini.fiddler.FiddlerAdmin "
                                      +"interface");
        }
  Configuration c = QAConfig.getConfig().getConfiguration();
  if (!(c instanceof com.sun.jini.qa.harness.QAConfiguration)) { // if none configuration
      return (FiddlerAdmin) admin;
  }
  try {
      ProxyPreparer p = (ProxyPreparer) c.getEntry("test",
               "fiddlerAdminPreparer",
               ProxyPreparer.class);
      return ((FiddlerAdmin) p.prepareProxy(admin));
  } catch (ConfigurationException e) {
      throw new TestException("Configuration Error", e);
View Full Code Here

TOP

Related Classes of net.jini.config.Configuration

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.