Package de.scoopgmbh.copper.monitoring.core

Examples of de.scoopgmbh.copper.monitoring.core.LoginService


    String host = (args.length > 0) ? args[0] : "localhost";
    int port = (args.length > 1) ? Integer.parseInt(args[1]) : 8080;
   
    CopperMonitoringService monitoringService;
    LoginService loginService;
    RemoteInvocationExecutor remoteInvocationExecutor;
    if(unsecure) {
      monitoringService = CopperMonitorServiceDefaultProxy.getServiceProxy(copperMonitoringService);
      loginService = new DefaultLoginService();
      remoteInvocationExecutor = new DefaultRemoteInvocationExecutor();
View Full Code Here


    String serverAdress = serverAdressParam;
    if (!serverAdress.endsWith("/")) {
      serverAdress = serverAdress + "/";
    }

    final LoginService loginService;
    final CommonsHttpInvokerRequestExecutor httpInvokerRequestExecutor = new CommonsHttpInvokerRequestExecutor();
    DefaultHttpMethodRetryHandler retryHandler = new DefaultHttpMethodRetryHandler(10, false);
    httpInvokerRequestExecutor.getHttpClient().getParams().setParameter(HttpMethodParams.RETRY_HANDLER, retryHandler);
    httpInvokerRequestExecutor.getHttpClient().getParams().setSoTimeout(1000*60*5);
    {
      HttpInvokerProxyFactoryBean httpInvokerProxyFactoryBean = new HttpInvokerProxyFactoryBean();
      httpInvokerProxyFactoryBean.setServiceUrl(serverAdress + "copperMonitoringService");
      httpInvokerProxyFactoryBean.setServiceInterface(LoginService.class);
      httpInvokerProxyFactoryBean.setServiceUrl(serverAdress + "loginService");
      httpInvokerProxyFactoryBean.afterPropertiesSet();
      httpInvokerProxyFactoryBean.setHttpInvokerRequestExecutor(httpInvokerRequestExecutor);
      loginService = (LoginService) httpInvokerProxyFactoryBean.getObject();
    }

    final String sessionId;
    if(secureConnect) {
      try {
        sessionId = loginService.doLogin(user, password);
      } catch (RemoteException e) {
        throw new RuntimeException(e);
      }
    } else {
      sessionId = "";
View Full Code Here

      HttpInvokerProxyFactoryBean httpInvokerProxyFactoryBean = new HttpInvokerProxyFactoryBean();
      httpInvokerProxyFactoryBean.setServiceInterface(LoginService.class);
      httpInvokerProxyFactoryBean.setServiceUrl(LOGIN_SERVICE);
      httpInvokerProxyFactoryBean.setHttpInvokerRequestExecutor(new CommonsHttpInvokerRequestExecutor());
      httpInvokerProxyFactoryBean.afterPropertiesSet();
      LoginService loginService = (LoginService)httpInvokerProxyFactoryBean.getObject();
      sessionId = loginService.doLogin("user1", "pass1");
    }
 
    {
      final HttpInvokerProxyFactoryBean httpInvokerProxyFactoryBean = new HttpInvokerProxyFactoryBean();
      httpInvokerProxyFactoryBean.setServiceInterface(CopperMonitoringService.class);
View Full Code Here

      HttpInvokerProxyFactoryBean httpInvokerProxyFactoryBean = new HttpInvokerProxyFactoryBean();
      httpInvokerProxyFactoryBean.setServiceInterface(LoginService.class);
      httpInvokerProxyFactoryBean.setServiceUrl(LOGIN_SERVICE);
      httpInvokerProxyFactoryBean.setHttpInvokerRequestExecutor(new CommonsHttpInvokerRequestExecutor());
      httpInvokerProxyFactoryBean.afterPropertiesSet();
      LoginService loginService = (LoginService)httpInvokerProxyFactoryBean.getObject();
      sessionId = loginService.doLogin("userXXXX", "passXXXX");
      assertNull(sessionId);
    }
 
    {
      final HttpInvokerProxyFactoryBean httpInvokerProxyFactoryBean = new HttpInvokerProxyFactoryBean();
View Full Code Here

TOP

Related Classes of de.scoopgmbh.copper.monitoring.core.LoginService

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.