Package org.apache.shindig.gadgets.http

Examples of org.apache.shindig.gadgets.http.RequestPipeline


    // FIXME: Caja has trouble with the NekoSimplifiedHtmlParser
    // Disabling neko for now
    parsers = ImmutableList.of(/*neko, */caja);

    CacheProvider lru = new LruCacheProvider(3);
    RequestPipeline pipeline = EasyMock.createNiceMock(RequestPipeline.class);
    DefaultHtmlSerializer defaultSerializer = new DefaultHtmlSerializer();
    proxyUriManager = EasyMock.createNiceMock(ProxyUriManager.class);
    rewriter = new CajaContentRewriter(lru, pipeline, defaultSerializer, proxyUriManager) {
      @Override
      protected PluginCompiler makePluginCompiler(PluginMeta m, MessageQueue q) {
View Full Code Here


  private static class TestModule extends AbstractModule {

    @Override
    protected void configure() {
      bind(RequestPipeline.class).toInstance(new RequestPipeline() {
        public HttpResponse execute(HttpRequest request) { return null; }
        public void normalizeProtocol(HttpRequest request) throws GadgetException {}
      });

      bind(GadgetSpecFactory.class).toInstance(new GadgetSpecFactory() {
View Full Code Here

  private static class TestModule extends AbstractModule {

    @Override
    protected void configure() {
      bind(RequestPipeline.class).toInstance(new RequestPipeline() {
        public HttpResponse execute(HttpRequest request) { return null; }
        public void normalizeProtocol(HttpRequest request) throws GadgetException {}
      });

      bind(GadgetSpecFactory.class).toInstance(new GadgetSpecFactory() {
View Full Code Here

  private static class TestModule extends AbstractModule {

    @Override
    protected void configure() {
      bind(RequestPipeline.class).toInstance(new RequestPipeline() {
        public HttpResponse execute(HttpRequest request) { return null; }
      });

      bind(GadgetSpecFactory.class).toInstance(new GadgetSpecFactory() {
        public GadgetSpec getGadgetSpec(GadgetContext context) {
View Full Code Here

  private static class TestModule extends AbstractModule {

    @Override
    protected void configure() {
      bind(RequestPipeline.class).toInstance(new RequestPipeline() {
        public HttpResponse execute(HttpRequest request) { return null; }
      });

      bind(GadgetSpecFactory.class).toInstance(new GadgetSpecFactory() {
        public GadgetSpec getGadgetSpec(GadgetContext context) {
View Full Code Here

    rewriter.rewrite(request, hrb);
    return hrb.getContent();
  }

  private ResponseRewriter createRewriter() {
    return new CajaResponseRewriter(new RequestPipeline() {
      public HttpResponse execute(HttpRequest request) {
        return null;
      }
    });
  }
View Full Code Here

    Attr attr = doc.createAttribute(attrName);
    attr.setValue(url);
    node.setAttributeNode(attr);

    // Mock the RequestPipeline.
    RequestPipeline requestPipeline = createStrictMock(RequestPipeline.class);
    if (expectFetch) {
      expect(requestPipeline.execute(new HttpRequest(Uri.parse(url))))
          .andReturn(new HttpResponseBuilder().setResponseString("test").create()).once();
    }
    replay(requestPipeline);

    ContentRewriterFeature.Config config = createMock(ContentRewriterFeature.Config.class);
View Full Code Here

  private static class TestModule extends AbstractModule {

    @Override
    protected void configure() {
      bind(RequestPipeline.class).toInstance(new RequestPipeline() {
        public HttpResponse execute(HttpRequest request) { return null; }
      });

      bind(GadgetSpecFactory.class).toInstance(new GadgetSpecFactory() {
        public GadgetSpec getGadgetSpec(GadgetContext context) {
View Full Code Here

  private static class TestModule extends AbstractModule {

    @Override
    protected void configure() {
      bind(RequestPipeline.class).toInstance(new RequestPipeline() {
        public HttpResponse execute(HttpRequest request) { return null; }
      });

      bind(GadgetSpecFactory.class).toInstance(new GadgetSpecFactory() {
        public GadgetSpec getGadgetSpec(GadgetContext context) {
View Full Code Here

    // FIXME: Caja has trouble with the NekoSimplifiedHtmlParser
    // Disabling neko for now
    parsers = ImmutableList.of(/*neko, */caja);

    CacheProvider lru = new LruCacheProvider(3);
    RequestPipeline pipeline = EasyMock.createNiceMock(RequestPipeline.class);
    DefaultHtmlSerializer defaultSerializer = new DefaultHtmlSerializer();
    proxyUriManager = EasyMock.createNiceMock(ProxyUriManager.class);
    rewriter = new CajaContentRewriter(lru, pipeline, defaultSerializer, proxyUriManager) {
      @Override
      protected PluginCompiler makePluginCompiler(PluginMeta m, MessageQueue q) {
View Full Code Here

TOP

Related Classes of org.apache.shindig.gadgets.http.RequestPipeline

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.