Examples of PushletException


Examples of nl.justobjects.pushlet.util.PushletException

      try {
        // Setup Visitor Methods for callback from SessionManager
        Class[] argsClasses = {Session.class};
        visitMethod = this.getClass().getMethod("visit", argsClasses);
      } catch (NoSuchMethodException e) {
        throw new PushletException("Failed to setup AgingTimerTask", e);
      }
    }
View Full Code Here

Examples of nl.justobjects.pushlet.util.PushletException

  public static Subscriber create(Session aSession) throws PushletException {
    Subscriber subscriber;
    try {
      subscriber = (Subscriber) Config.getClass(SUBSCRIBER_CLASS, "nl.justobjects.pushlet.core.Subscriber").newInstance();
    } catch (Throwable t) {
      throw new PushletException("Cannot instantiate Subscriber from config", t);
    }

    subscriber.session = aSession;
    return subscriber;
  }
View Full Code Here

Examples of nl.justobjects.pushlet.util.PushletException

  public static Controller create(Session aSession) throws PushletException {
    Controller controller;
    try {
      controller = (Controller) Config.getClass(CONTROLLER_CLASS, "nl.justobjects.pushlet.core.Controller").newInstance();
    } catch (Throwable t) {
      throw new PushletException("Cannot instantiate Controller from config", t);
    }
    controller.session = aSession;
    return controller;
  }
View Full Code Here

Examples of nl.justobjects.pushlet.util.PushletException

  public static Session create(String anId) throws PushletException {
    Session session;
    try {
      session = (Session) Config.getClass(SESSION_CLASS, "nl.justobjects.pushlet.core.Session").newInstance();
    } catch (Throwable t) {
      throw new PushletException("Cannot instantiate Session from config", t);
    }

    // Init session
    session.id = anId;
    session.controller = Controller.create(session);
View Full Code Here

Examples of nl.justobjects.pushlet.util.PushletException

      return new XMLAdapter(httpRsp);
    } else if (outputFormat.equals(FORMAT_XML_STRICT)) {
      // Client expects to receive Events embedded in single XML doc.
      return new XMLAdapter(httpRsp, true);
    } else {
      throw new PushletException("Null or invalid output format: " + outputFormat);
    }
  }
View Full Code Here

Examples of nl.justobjects.pushlet.util.PushletException

    Subscription subscription;
    try {
      subscription = (Subscription) Config.getClass(SUBSCRIPTION_CLASS, "nl.justobjects.pushlet.core.Subscription").newInstance();
    } catch (Throwable t) {
      throw new PushletException("Cannot instantiate Subscriber from config", t);
    }

    // Init
    subscription.subject = aSubject;
View Full Code Here

Examples of nl.justobjects.pushlet.util.PushletException

    Class clazz = getClass(aClassNameProp, aDefault);
    try {
      return clazz.newInstance();
    } catch (Throwable t) {
      // Usually a misconfiguration
      throw new PushletException("Cannot instantiate class for " + aClassNameProp + "=" + clazz, t);
    }
  }
View Full Code Here

Examples of nl.justobjects.pushlet.util.PushletException

    try {
      return Class.forName(clazz);
    } catch (ClassNotFoundException t) {
      // Usually a misconfiguration
      throw new PushletException("Cannot find class for " + aClassNameProp + "=" + clazz, t);
    }
  }
View Full Code Here

Examples of nl.justobjects.pushlet.util.PushletException

        // on each invokation.
        Class[] argsClasses = {Session.class, Event.class};
        visitorMethods.put("visitMulticast", this.getClass().getMethod("visitMulticast", argsClasses));
        visitorMethods.put("visitBroadcast", this.getClass().getMethod("visitBroadcast", argsClasses));
      } catch (NoSuchMethodException e) {
        throw new PushletException("Failed to setup SessionManagerVisitor", e);
      }
    }
View Full Code Here

Examples of nl.justobjects.pushlet.util.PushletException

    }
  }

  protected void throwOnNack(Event anEvent) throws PushletException {
    if (anEvent.getEventType().equals(E_NACK)) {
      throw new PushletException("Negative response: reason=" + anEvent.getField(P_REASON));
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.