Package com.ibm.sbt.services.client

Examples of com.ibm.sbt.services.client.ClientService$HandlerInputStream


  public ClientService getClientService() throws ClientServicesException {
      // If the client service class is defined, then we instanciate it
      String cls = getClientServiceClass();
      if(StringUtil.isNotEmpty(cls)) {
        try {
          ClientService clientService = null;
          // order of precedence for the classloader to use
          Context ctx = Context.getUnchecked();
          Application app = Application.getUnchecked();
          ClassLoader cl = Thread.currentThread().getContextClassLoader();
          if (ctx!=null) {
            clientService = (ClientService)ctx.getClassLoader().loadClass(cls).newInstance();
          } else if(app!=null) {
            clientService = (ClientService)app.getClassLoader().loadClass(cls).newInstance();
          } else if(cl!=null) {
            clientService = (ClientService)cl.loadClass(cls).newInstance();
          } else {
            clientService = (ClientService)Class.forName(cls).newInstance();
          }
          // set endpoint
          clientService.setEndpoint(this);

          return clientService;
       } catch(Exception ex) {
          throw new ClientServicesException(ex,"Cannot create ClientService class {0}",cls);
        }
View Full Code Here

TOP

Related Classes of com.ibm.sbt.services.client.ClientService$HandlerInputStream

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.