Package com.sun.sgs.app

Examples of com.sun.sgs.app.ManagedObject


    /* -- Implement DataService -- */
    public long getLocalNodeId() {
  throw new UnsupportedOperationException();
    }
    public ManagedObject getServiceBinding(String name) {
  ManagedObject obj = get(name);
  if (obj == null) {
      throw new NameNotBoundException(name);
  } else if (removedObjectsContains(obj)) {
      throw new ObjectNotFoundException(obj.toString());
  }
  return obj;
    }
View Full Code Here


  testSetBindingNotSerializable(false);
    }
    private void testSetBindingNotSerializable(final boolean app)
        throws Exception
    {
  final ManagedObject mo = new ManagedObject() { };
        txnScheduler.runTask(new InitialTestRunnable() {
            public void run() throws Exception {
                super.run();
                try {
                    setBinding(app, service, "dummy", mo);
View Full Code Here

    @Test
    public void testRemoveObjectNotSerializable() throws Exception {
        txnScheduler.runTask(new InitialTestRunnable() {
            public void run() throws Exception {
                super.run();
                ManagedObject mo = new ManagedObject() { };
                try {
                    service.removeObject(mo);
                    fail("Expected IllegalArgumentException");
                } catch (IllegalArgumentException e) {
                    System.err.println(e);
View Full Code Here

    @Test
    public void testMarkForUpdateNotSerializable() throws Exception {
        txnScheduler.runTask(new InitialTestRunnable() {
            public void run() throws Exception {
                super.run();
                ManagedObject mo = new ManagedObject() { };
                try {
                    service.markForUpdate(mo);
                    fail("Expected IllegalArgumentException");
                } catch (IllegalArgumentException e) {
                    System.err.println(e);
View Full Code Here

    @Test
    public void testCreateReferenceNotSerializable() throws Exception {
        txnScheduler.runTask(new TestAbstractKernelRunnable() {
            public void run() {
                ManagedObject mo = new ManagedObject() { };
                try {
                    service.createReference(mo);
                    fail("Expected IllegalArgumentException");
                } catch (IllegalArgumentException e) {
                    System.err.println(e);
View Full Code Here

    @Test
    public void testGetObjectIdNotSerializable() throws Exception {
        txnScheduler.runTask(new TestAbstractKernelRunnable() {
            public void run() {
                ManagedObject mo = new ManagedObject() { };
                try {
                    service.getObjectId(mo);
                    fail("Expected IllegalArgumentException");
                } catch (IllegalArgumentException e) {
                    System.err.println(e);
View Full Code Here

         *
         * @return the {@code AppListener} for the application
         */
        @SuppressWarnings("unchecked")
        private AppListener getAppListener() {
            ManagedObject obj = dataService.getServiceBinding(
                    StandardProperties.APP_LISTENER);
            return (obj instanceof AppListener) ?
                (AppListener) obj :
                ((ManagedSerializable<AppListener>) obj).get();
        }
View Full Code Here

TOP

Related Classes of com.sun.sgs.app.ManagedObject

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.