Package com.sun.sgs.app

Examples of com.sun.sgs.app.AppListener


            try {
                // test to see if this name if the listener is already bound...
                dataService.getServiceBinding(StandardProperties.APP_LISTENER);
            } catch (NameNotBoundException nnbe) {
                // ...if it's not, create and then bind the listener
                AppListener listener =
                    (new PropertiesWrapper(properties)).
                    getClassInstanceProperty(StandardProperties.APP_LISTENER,
                                             AppListener.class, new Class[] {});
                if (listener instanceof ManagedObject) {
                    dataService.setServiceBinding(
                            StandardProperties.APP_LISTENER, listener);
                } else {
                    dataService.setServiceBinding(
                            StandardProperties.APP_LISTENER,
                            new ManagedSerializable<AppListener>(listener));
                }

                // since we created the listener, we're the first one to
                // start the app, so we also need to start it up
                listener.initialize(properties);
            }
        }
View Full Code Here


   * If {@code loggedIn} throws a retryable {@code
   * RuntimeException}, then that exception is thrown to the
   * caller.
   */
  public void run() {
      AppListener appListener = getAppListener();
      logger.log(
    Level.FINEST,
    "invoking AppListener.loggedIn session:{0}", identity);

      ClientSessionListener returnedListener = null;
      RuntimeException ex = null;

      ClientSessionImpl sessionImpl =
    ClientSessionImpl.getSession(dataService, sessionRefId);
      try {
    returnedListener =
        appListener.loggedIn(sessionImpl.getWrappedClientSession());
      } catch (RuntimeException e) {
    ex = e;
      }
   
      if (returnedListener instanceof Serializable) {
View Full Code Here

            try {
                // test to see if this name if the listener is already bound...
                dataService.getServiceBinding(StandardProperties.APP_LISTENER);
            } catch (NameNotBoundException nnbe) {
                // ...if it's not, create and then bind the listener
                AppListener listener =
                    (new PropertiesWrapper(properties)).
                    getClassInstanceProperty(StandardProperties.APP_LISTENER,
                                             AppListener.class, new Class[] {});
                if (listener instanceof ManagedObject) {
                    dataService.setServiceBinding(
                            StandardProperties.APP_LISTENER, listener);
                } else {
                    dataService.setServiceBinding(
                            StandardProperties.APP_LISTENER,
                            new ManagedSerializable<AppListener>(listener));
                }

                // since we created the listener, we're the first one to
                // start the app, so we also need to start it up
                listener.initialize(properties);
            }
        }
View Full Code Here

   * If {@code loggedIn} throws a retryable {@code
   * RuntimeException}, then that exception is thrown to the
   * caller.
   */
  public void run() {
      AppListener appListener = getAppListener();
      logger.log(
    Level.FINEST,
    "invoking AppListener.loggedIn session:{0}", identity);

      ClientSessionListener returnedListener = null;
      RuntimeException ex = null;

      ClientSessionImpl sessionImpl =
    ClientSessionImpl.getSession(dataService, sessionRefId);
      try {
    returnedListener =
        appListener.loggedIn(sessionImpl.getWrappedClientSession());
      } catch (RuntimeException e) {
    ex = e;
      }
   
      if (returnedListener instanceof Serializable) {
View Full Code Here

            try {
                // test to see if this name if the listener is already bound...
                dataService.getServiceBinding(StandardProperties.APP_LISTENER);
            } catch (NameNotBoundException nnbe) {
                // ...if it's not, create and then bind the listener
                AppListener listener =
                    (new PropertiesWrapper(properties)).
                    getClassInstanceProperty(StandardProperties.APP_LISTENER,
                                             AppListener.class, new Class[] {});
                if (listener instanceof ManagedObject) {
                    dataService.setServiceBinding(
                            StandardProperties.APP_LISTENER, listener);
                } else {
                    dataService.setServiceBinding(
                            StandardProperties.APP_LISTENER,
                            new ManagedSerializable<AppListener>(listener));
                }

                // since we created the listener, we're the first one to
                // start the app, so we also need to start it up
                listener.initialize(properties);
            }
        }
View Full Code Here

   * If {@code loggedIn} throws a retryable {@code
   * RuntimeException}, then that exception is thrown to the
   * caller.
   */
  public void run() {
      AppListener appListener = getAppListener();
      logger.log(
    Level.FINEST,
    "invoking AppListener.loggedIn session:{0}", identity);

      ClientSessionListener returnedListener = null;
      RuntimeException ex = null;

      ClientSessionImpl sessionImpl =
    ClientSessionImpl.getSession(dataService, sessionRefId);
      try {
    returnedListener =
        appListener.loggedIn(sessionImpl.getWrappedClientSession());
      } catch (RuntimeException e) {
    ex = e;
      }
   
      if (returnedListener instanceof Serializable) {
View Full Code Here

            try {
                // test to see if this name if the listener is already bound...
                dataService.getServiceBinding(StandardProperties.APP_LISTENER);
            } catch (NameNotBoundException nnbe) {
                // ...if it's not, create and then bind the listener
                AppListener listener =
                    (new PropertiesWrapper(properties)).
                    getClassInstanceProperty(StandardProperties.APP_LISTENER,
                                             AppListener.class, new Class[] {});
                if (listener instanceof ManagedObject) {
                    dataService.setServiceBinding(
                            StandardProperties.APP_LISTENER, listener);
                } else {
                    dataService.setServiceBinding(
                            StandardProperties.APP_LISTENER,
                            new ManagedSerializable<AppListener>(listener));
                }

                // since we created the listener, we're the first one to
                // start the app, so we also need to start it up
                listener.initialize(properties);
            }
        }
View Full Code Here

TOP

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

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.