Package gnu.x11.event

Examples of gnu.x11.event.Event


    private ViewProxy callAndMapHandlers(ForwardProxy proxy) throws Exception {
      boolean valid = true;
      ForwardProxy result = proxy;
        while (result.isEventType()) {
          // Map URI params into event, then callHandlers again
          Event next = getConfig().getEventProxy(result.getPath()).getEvent();
          if (getContextWrapper().hasResponseURIAttributes()) {
            valid = mapAttributesToEvent(getContextWrapper().getResponseURIAttributes(), next, getConfig().validateFor(next.getEventName()));
          }
          if (valid) {
            result = callHandlers(result.getPath(), next, ViewType.HTML);
          } else {
            return new ViewProxy(result, getValidationFailedView(next, next.getEventName()).getPath());
          }
        }
      getContextWrapper().clearResponseURIAttributes();
      return new ViewProxy(result, result.getPath());
    }
View Full Code Here


      new Configuration("org/megatome/frame2/front/test-config.xml"); //$NON-NLS-1$
  }

  @Test
  public void testEventBinding() {
    Event event = null;
    try {
      event = this.config.getEventProxy("event1").getEvent(); //$NON-NLS-1$
    } catch (ConfigException e) {
      fail("Unexpected ConfigException: " + e.getMessage()); //$NON-NLS-1$
    }
View Full Code Here

    setServletPath("/event1"); //$NON-NLS-1$

    HttpRequestProcessor request = createHelper(config);

    Event event = request.getEvent();

    assertNotNull(event);
    assertTrue(event instanceof Event1);
  }
View Full Code Here

    request.processRequest();

    verifyForwardPath("/view1.jsp"); //$NON-NLS-1$

    Event evt1 = (Event) request.getContextWrapper().getRequestAttribute(
        "eventChain1"); //$NON-NLS-1$
    assertNotNull(evt1);

    String eventChainName = (String) request.getContextWrapper()
        .getRequestAttribute("eventChainName"); //$NON-NLS-1$
View Full Code Here

      setServletPath("/" + EVENT_NAME + ".f2"); //$NON-NLS-1$ //$NON-NLS-2$
      HttpRequestProcessor requestProc = createHelper(config);

      requestProc.processRequest();
      HttpServletRequest request = getRequest();
      Event event = (Event) request.getAttribute(EVENT_NAME);

      assertEquals(EVENT_NAME, event.getEventName());
    } catch (Throwable e) {
      fail();
    }

  }
View Full Code Here

      }
    };
   
    brokerInstance.subscribeNonPersistantly(subscription, dispatcher);
   
    brokerInstance.publishEvent(new Event(new Object(), topic));
   
    Thread.sleep(10000);
  }
View Full Code Here

TOP

Related Classes of gnu.x11.event.Event

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.