Package net.jini.jeri

Examples of net.jini.jeri.BasicJeriExporter


  Impl(ActivationID aid, MarshalledObject mo)
      throws Exception
  {
      myAid = aid;
      Exporter basicExporter =
    new BasicJeriExporter(TcpServerEndpoint.getInstance(0),
              new BasicILFactory(), false, true);
      exp = new ActivationExporter(aid, basicExporter);
      proxy = exp.export(this);
  }
View Full Code Here


    protected Exporter getExporter()
  throws ConfigurationException, RemoteException
    {
  return (Exporter) config.getEntry(
      "com.sun.jini.example.hello.Server", "exporter", Exporter.class,
      new BasicJeriExporter(TcpServerEndpoint.getInstance(0),
          new BasicILFactory()));
    }
View Full Code Here

      if (exportType.equals("default")) {
    stub = Activatable.exportObject(impl, id, 0);
      } else {
    Exporter uexporter;
    if (exportType.equals("basic")) {
        uexporter = new
      BasicJeriExporter(TcpServerEndpoint.getInstance(0),
            new BasicILFactory(),
            true, true);
    } else if (exportType.equals("jrmp")) {
        uexporter = new JrmpExporter();
View Full Code Here

  MarshalledObjectGet obj = new MarshalledObjectGet();
  Exporter exporter = null;

  try {
      exporter = new BasicJeriExporter(TcpServerEndpoint.getInstance(0),
               new BasicILFactory(), true, true);
      Remote stub = exporter.export(obj);
      System.err.println("exported remote object");

      MarshalledObject mobj = new MarshalledObject(stub);
View Full Code Here

      serverExporter = (Exporter) Config.getNonNullEntry(
    config, COMPONENT, "serverExporter", Exporter.class,
    new ActivationExporter(
        this.activationID,
        new BasicJeriExporter(
      TcpServerEndpoint.getInstance(0),
      new BasicILFactory())),
    this.activationID);
  } else {
      this.activationID = null;
      activationSystem = null;

      serverExporter = (Exporter) Config.getNonNullEntry(
    config, COMPONENT, "serverExporter", Exporter.class,
    new BasicJeriExporter(
        TcpServerEndpoint.getInstance(0),
        new BasicILFactory()));
  }

  /* fetch "initial*" config entries, if first time starting up */
 
View Full Code Here

    (permClass != null ? ", " + permClass.getName() : "") +
    "]";
  } else if (object instanceof Uuid) {
      return "Uuid";
  } else if (object instanceof BasicJeriExporter) {
      BasicJeriExporter exporter = (BasicJeriExporter) object;
      return
    "BasicJeriExporter {" +
    "\n\tendpoint: " + toString(exporter.getServerEndpoint()) +
    "\n\tilFactory: " +
    toString(exporter.getInvocationLayerFactory()) +
    "\n\tenableDGC: " + exporter.getEnableDGC() +
    "\n\tkeepAlive: " + exporter.getKeepAlive() +
    "\n\tobjID: " + toString(exporter.getObjectIdentifier()) +
    "\n    }";
  } else if (object.getClass().isArray()) {
      Class c = object.getClass();
      int dimensions = 0;
      while (c.isArray()) {
View Full Code Here

  /* What we use for the default (or in the default activatable case
   * what we make the underlying exporter).
   */
  final Exporter basicExporter =
      new BasicJeriExporter(TcpServerEndpoint.getInstance(0),
          new BasicILFactory(), false, true);
  if (activationID == null) {
      exporter = (Exporter)Config.getNonNullEntry(config,
    COMPONENT_NAME,  "serverExporter", Exporter.class,
    basicExporter);
View Full Code Here

    //inherit javadoc
    public void run() throws Exception {
        //Verify that an object exported by BasicJeriExporter is trusted
        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)){
            throw new TestException("Returned false for an"
View Full Code Here

     */
    public void run() throws Exception {
        //Create an exporter instance
        int listenPort = config.getIntConfigVal("com.sun.jini.test.spec.jeri"
            + ".basicjeriexporter.listenPort", 9090);
        BasicJeriExporter exporter = new BasicJeriExporter(
            TcpServerEndpoint.getInstance(listenPort), new BJETestILFactory());
        try {
            //Call unexport on the exporter instance
            exporter.unexport(true);
            throw new TestException("Unexporting with an unused"
                    + "exporter does not cause an exception to be thrown");
        } catch (IllegalStateException e) {
            //Verify that in IllegalStateException is thrown
        }
View Full Code Here

        //register a transport listener
        BJETransportListener.registerListener(new TransportListenerHelper());
        //Construct a BasicJeriExporter using an instrumented server endpoint
        int listenPort = config.getIntConfigVal("com.sun.jini.test.spec.jeri"
            + ".basicjeriexporter.ConstructorTest.listenPort",9090);
        BasicJeriExporter exporter = new BasicJeriExporter(
            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) {
                    //OK
                } else {
View Full Code Here

TOP

Related Classes of net.jini.jeri.BasicJeriExporter

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.