Package org.apache.wicket

Examples of org.apache.wicket.ThreadContext


  /**
   * reuse an existing session if possible
   */
  public static <V> V withRequest(WebApplication webApplication, IMockRequestCallback<V> callback) {
    Session oldSession = ThreadContext.exists() ? ThreadContext.getSession() : null;
    ThreadContext oldContext = ThreadContext.detach();

    try {
      ThreadContext.setApplication(webApplication);
      ThreadContext.setSession(oldSession);

View Full Code Here


   *
   * @param event
   */
  public void post(Object event)
  {
    ThreadContext oldContext = ThreadContext.get(false);
    try
    {
      ThreadContext.restore(null);
      ThreadContext.setApplication(application);
      for (AtmosphereResource resource : broadcaster.getAtmosphereResources())
View Full Code Here

   * @param event
   * @param resource
   */
  public void post(Object event, AtmosphereResource resource)
  {
    ThreadContext oldContext = ThreadContext.get(false);
    try
    {
      postToSingleResource(event, resource);
    }
    finally
View Full Code Here

   *
   * @param event
   */
  public void post(Object event)
  {
    ThreadContext oldContext = ThreadContext.get(false);
    try
    {
      for (AtmosphereResource resource : broadcaster.getAtmosphereResources())
      {
        postToSingleResource(event, resource);
View Full Code Here

TOP

Related Classes of org.apache.wicket.ThreadContext

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.