Package com.subgraph.vega.api.scanner

Examples of com.subgraph.vega.api.scanner.IInjectionModuleContext


  public void requeueInitialFetch() {
    if(lockedFlag) {
      return;
    }
    final IInjectionModuleContext ctx = new ModuleContext(pathStateManager, requestBuilder, this, 0);
    final HttpUriRequest req = createRequest();
    submitRequest(req, initialFetchProcessor, ctx);
  }
View Full Code Here


  private void setLocked() {
    lockedFlag = true;
  }

  private void performInitialFetch() {
    final IInjectionModuleContext ctx = new ModuleContext(pathStateManager, requestBuilder, this, 0);
    final HttpUriRequest req = createRequest();

    if(response != null) {
      initialFetchProcessor.processResponse(pathStateManager.getCrawler(), req, response, ctx);
    } else {
View Full Code Here

    return unknownFingerprint;
  }

  public void submitRequest(ICrawlerResponseProcessor callback) {
    final HttpUriRequest req = requestBuilder.createBasicRequest();
    final IInjectionModuleContext ctx = createModuleContext();
    submitRequest(req, callback, ctx);
  }
View Full Code Here

    final IInjectionModuleContext ctx = createModuleContext();
    submitRequest(req, callback, ctx);
  }

  public void submitRequest(HttpUriRequest request, ICrawlerResponseProcessor callback) {
    final IInjectionModuleContext ctx = createModuleContext();
    submitRequest(request, callback, ctx);
  }
View Full Code Here

    this.injectionChecks = injectionChecks;
  }

  @Override
  public void initialize(IPathState ps) {
    final IInjectionModuleContext ctx = ps.createModuleContext();

    for(int i = 0; i < BH_CHECKS; i++) {
      ctx.submitRequest(ps.createRequest(), this, i);
    }
  }
View Full Code Here

    runModule(request, response, (IInjectionModuleContext) argument);
  }
 
  @Override
  public void processException(HttpUriRequest request, Throwable ex, Object argument) {
    final IInjectionModuleContext ctx = (IInjectionModuleContext) argument;
    ctx.reportRequestException(request, ex);
  }
View Full Code Here

    if(!ps.has404Fingerprints() || !hasSuitablePath(ps)) {
      ipsCheck.initialize(ps);
      return;
    }
   
    final IInjectionModuleContext ctx = ps.createModuleContext();
    final HttpUriRequest req = createRequest(ps);
    ctx.submitRequest(req, this, 0);
  }
View Full Code Here

public class OgnlHandler implements ICrawlerResponseProcessor {

  @Override
  public void processResponse(IWebCrawler crawler, HttpUriRequest request,
      IHttpResponse response, Object argument) {
    final IInjectionModuleContext ctx = (IInjectionModuleContext) argument;

    if(ctx.hasModuleFailed())
      return;
   
    if(response.isFetchFail()) {
      ctx.setModuleFailed();
      ctx.error(request, response, "during OGNL tests");
      return;
    }
   
    ctx.addRequestResponse(ctx.getCurrentIndex(), request, response);
    if(ctx.incrementResponseCount() < 2)
      return;
    final IPageFingerprint pathFP = ctx.getPathState().getPathFingerprint();
   
    if(ctx.isFingerprintMatch(0, pathFP) && ! ctx.isFingerprintMatch(1, pathFP)) {
      System.out.println("Problem: response to [0]['name']=... identical to name=...");     
    }
  }
View Full Code Here

    }
  }

  @Override
  public void processException(HttpUriRequest request, Throwable ex, Object argument) {
    final IInjectionModuleContext ctx = (IInjectionModuleContext) argument;
    ctx.reportRequestException(request, ex);
  }
View Full Code Here

  private final DirParentCheck dirParentCheck = new DirParentCheck();
  private final CaseSensitivityCheck caseSensitivityCheck = new CaseSensitivityCheck();

  @Override
  public void initialize(IPathState ps) {
    final IInjectionModuleContext ctx = ps.createModuleContext();
    ctx.submitAlteredRequest(this, "/"+ PAGE_DOES_NOT_EXIST);
  }
View Full Code Here

TOP

Related Classes of com.subgraph.vega.api.scanner.IInjectionModuleContext

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.