Package com.sun.sgs.app.util

Examples of com.sun.sgs.app.util.ManagedSerializable


        //We have to hang on to the wonderlandClientID to call the listener when we're done.
        //We can't pass it as an argument because of darkstar transactions
        //So create put it in the dataservice and keep a reference to it
        //Create a wrapper for the clientID, as it's not a managed object
        ManagedSerializable<WonderlandClientID> managedClientID = new ManagedSerializable(clientID);

        //create a refereence to the wrapped clientID
        ManagedReference<ManagedSerializable<WonderlandClientID>> wci = dataService.createReference(managedClientID);

View Full Code Here


  if (nodeId == localNodeId) {
      return serverImpl;
  } else {
      String sessionServerKey = getClientSessionServerKey(nodeId);
      try {
    ManagedSerializable wrappedProxy = (ManagedSerializable)
        dataService.getServiceBinding(sessionServerKey);
    return (ClientSessionServer) wrappedProxy.get();
      } catch (NameNotBoundException e) {
    return null;
      catch (ObjectNotFoundException e) {
    logger.logThrow(
        Level.SEVERE, e,
View Full Code Here

  if (nodeId == localNodeId) {
      return serverImpl;
  } else {
      String sessionServerKey = getClientSessionServerKey(nodeId);
      try {
    ManagedSerializable wrappedProxy = (ManagedSerializable)
        dataService.getServiceBinding(sessionServerKey);
    return (ClientSessionServer) wrappedProxy.get();
      } catch (NameNotBoundException e) {
    return null;
      catch (ObjectNotFoundException e) {
    logger.logThrow(
        Level.SEVERE, e,
View Full Code Here

        set.add(null);
        set.add(1);
        set.add(2);
        Iterator<Object> iter = set.iterator();
        dataService.setBinding("iter",
             new ManagedSerializable(iter));
    }
      }), taskOwner);
  txnScheduler.runTask(
      new TestTask(new TestAbstractKernelRunnable() {
    public void run() {
View Full Code Here

      new TestTask(new TestAbstractKernelRunnable() {
    public void run() {
        set.add(one);
        Iterator<Object> iter = set.iterator();
        dataService.setBinding("iter",
             new ManagedSerializable(iter));
    }
      }), taskOwner);
  txnScheduler.runTask(
      new TestTask(new TestAbstractKernelRunnable() {
    public void run() {
View Full Code Here

    public void run() {
        set.add(one);
        set.add(new Int(2));
        Iterator<Object> iter = set.iterator();
        dataService.setBinding("iter",
             new ManagedSerializable(iter));
    }
      }), taskOwner);
  txnScheduler.runTask(
      new TestTask(new TestAbstractKernelRunnable() {
    public void run() {
View Full Code Here

      iter.remove();
      fail("Expected IllegalStateException");
        } catch (IllegalStateException e) {
        }
        dataService.setBinding("iter",
             new ManagedSerializable(iter));
    }
      }), taskOwner);
  txnScheduler.runTask(
      new TestTask(new TestAbstractKernelRunnable() {
    public void run() {
View Full Code Here

    public void run() {
        set.add(one);
        Iterator<Object> iter = set.iterator();
        iterRef.set(iter);
        dataService.setBinding("iter",
             new ManagedSerializable(iter));
    }
      }), taskOwner);
  txnScheduler.runTask(
      new TestTask(new TestAbstractKernelRunnable() {
    public void run() {
View Full Code Here

          Proxy.newProxyInstance(
        ClientSessionServer.class.getClassLoader(),
        new Class[] { ClientSessionServer.class },
        handler);
      dataService.setServiceBinding(
          key, new ManagedSerializable(delayingServer));
        }
    }}, taskOwner);

      for (int i = 0; i < iterations; i++) {
    for (SgsTestNode node : nodes) {
View Full Code Here

        assertEquals(50, values.size());
        assertTrue(controlValues.containsAll(values));
        assertIteratorContains(controlValues, values.iterator());

        dataService.setBinding("values",
             new ManagedSerializable(values));
    }
      }, taskOwner);
  txnScheduler.runTask(
      new TestAbstractKernelRunnable() {
    public void run() throws Exception {
View Full Code Here

TOP

Related Classes of com.sun.sgs.app.util.ManagedSerializable

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.