Package org.corrib.s3b.mbb.service

Examples of org.corrib.s3b.mbb.service.MBBMetaService


   * @param soaCall String representation of an URL which defined the SOA call
   * @return a {@link ServiceChain} object decoded from given URL
   */
  public static final ServiceChain decode(String soaCall, String baseUrl) {
    List<MBBService> tmpchain = new ArrayList<MBBService>();
    MBBMetaService tmpmetaservice = null;
    String previousCall = "";
    List<String> params;
    MBBServices tmpmatchedService = null;
   
    while(true) {
      params = new ArrayList<String>();
      tmpmatchedService = MBBServices.match((baseUrl != null)?baseUrl:ConfigKeeper.getServiceUrl(), previousCall, soaCall, params, true);
     
      if(tmpmatchedService == null) {
        params = new ArrayList<String>();
        tmpmatchedService = MBBServices.matchMeta((baseUrl != null)?baseUrl:ConfigKeeper.getServiceUrl(), previousCall, soaCall, params, true);
      }
     
      if(tmpmatchedService != null && tmpmatchedService.getImplementation() != null) {

        MBBService mbbService;
        try {
          if(tmpmatchedService.isMeta()) {
            if(tmpmatchedService.getImplementation().equals(StatsMetaService.class) && params.size() > 7) {
              tmpmetaservice = StatsMetaService.get(params.get(7));
              tmpmetaservice.setParams(params);
            }else {
              try {
                Method get = tmpmatchedService.getImplementation().getMethod("get", String.class);
 
                if(params.size() > 1)
                  tmpmetaservice = (MBBMetaService)get.invoke(null, params.get(1));
                else
                  tmpmetaservice = (MBBMetaService)get.invoke(null, (String)null);

                tmpmetaservice.setParams(params);
              } catch (SecurityException e) {
                logger.severe("Something is wrong with the setup of MBB: "+e);
              } catch (NoSuchMethodException e) {
                logger.severe("Something is wrong with the setup of MBB: "+e);
              } catch (IllegalArgumentException e) {
View Full Code Here

TOP

Related Classes of org.corrib.s3b.mbb.service.MBBMetaService

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.