Package com.alu.e3.rate.manager

Examples of com.alu.e3.rate.manager.IGatewayRateManager


    return mVal;
  }

  private static final TdrData fromDataModel(TdrGenerationRule tdrGenerationRule) {
    if (tdrGenerationRule==null) return null; //throw new IllegalArgumentException("tdrGenerationRules must not be null");
    TdrData t = new TdrData();
    t.getStatic().addAll  (BeanConverterUtil.<StaticTdr, TdrStaticRule>fromDataModels(tdrGenerationRule.getStaticRules()));
    t.getDynamic().addAll  (BeanConverterUtil.<DynamicTdr, TdrDynamicRule>fromDataModels(tdrGenerationRule.getDynamicRules()));
    return t;
  }
View Full Code Here


    StaticTdr s = new StaticTdr();
    s.setValue          (tdrStaticRule.getValue());
    s.setTdrPropName      (tdrStaticRule.getTdrPropName());
    s.setPropertyName      (tdrStaticRule.getPropertyName());

    TdrType tdrType = new TdrType();
    s.setTypes          (tdrType);
    tdrType.getType().addAll  (tdrStaticRule.getTypes());

    return s;
  }
View Full Code Here

    DynamicTdr s = new DynamicTdr();
    s.setHttpHeaderName      (tdrDynamicRule.getHttpHeaderName());
    s.setTdrPropName      (tdrDynamicRule.getTdrPropName());
    s.setExtractFrom      (tdrDynamicRule.getExtractFrom());

    TdrType tdrType = new TdrType();
    s.setTypes          (tdrType);
    tdrType.getType().addAll  (tdrDynamicRule.getTypes());

    return s;
  }
View Full Code Here

  private static final Validation fromDataModel(com.alu.e3.data.model.sub.Validation val) {
    if (val == null)
      return null;

    Validation rVal = new Validation();

    if (val.getXml() != null) {
      rVal.setXml(new Validation.Xml());
    }
    if (val.getSchema() != null) {
      rVal.setSchema(fromDataModel(val.getSchema()));
    }

    if (val.getSoap() != null) {
      rVal.setSoap(new Validation.Soap(com.alu.e3.prov.restapi.model.SoapVersionEnum.fromValue(val.getSoap().getVersion().value())));
    }

    return rVal;
  }
View Full Code Here

    AuthProcessorMock authProcessor =  new AuthProcessorMock(authIdentity);

    checkAuth.whenAnyExchangeReceived(authProcessor);

    RateLimitProcessor rateProcessor = new RateLimitProcessor();
    rateProcessor.setGatewayRateMger(new IGatewayRateManager() {

      @Override
      public LimitCheckResult isAllowed(AuthIdentity authIdentity, boolean isTDREnabled) {
        LimitCheckResult result = new LimitCheckResult();
        return result;
View Full Code Here

    AuthProcessorMock authProcessor =  new AuthProcessorMock(authIdentity);

    checkAuth.whenAnyExchangeReceived(authProcessor);

    RateLimitProcessor rateProcessor = new RateLimitProcessor();
    rateProcessor.setGatewayRateMger(new IGatewayRateManager() {

      @Override
      public LimitCheckResult isAllowed(AuthIdentity authIdentity, boolean isTDREnabled) {
        LimitCheckResult result = new LimitCheckResult();
        result.setActionType(ActionType.REJECT);
View Full Code Here

   
    return perfWatch;
  }
 
  public TdrStreamWriter(File dir) throws TransformerConfigurationException {
    this(new RotatableFileWriterProvider(dir, TDR_FILE_SIZE, TDR_FILE_AGE) {
      @Override
      protected String getFileName() {
        return "tdrs." + System.currentTimeMillis() + ".xml";   // TDR file name
      }
View Full Code Here

   
    topologyWatcher.setPollingInterval(POLLING_INTERVAL);
   
    topologyClient = new DummyTopologyClient();
   
    healthCheckFactory = new DummyHealthCheckFactory();
   
    setHealthCheckGateways(gatewayList);
    setHealthCheckGatewaysActive(gatewayActiveList);
    setHealthCheckSpeakers(activeSpeakerList);
   
View Full Code Here

  private void createTestResources(String[] gatewayList, String[] gatewayActiveList, String[] activeSpeakerList) {
    topologyWatcher = new TopologyWatcher();
   
    topologyWatcher.setPollingInterval(POLLING_INTERVAL);
   
    topologyClient = new DummyTopologyClient();
   
    healthCheckFactory = new DummyHealthCheckFactory();
   
    setHealthCheckGateways(gatewayList);
    setHealthCheckGatewaysActive(gatewayActiveList);
View Full Code Here

   
    return instance;
  }
 
  private void createTestResources(String[] gatewayList, String[] gatewayActiveList, String[] activeSpeakerList) {
    topologyWatcher = new TopologyWatcher();
   
    topologyWatcher.setPollingInterval(POLLING_INTERVAL);
   
    topologyClient = new DummyTopologyClient();
   
View Full Code Here

TOP

Related Classes of com.alu.e3.rate.manager.IGatewayRateManager

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.