Package org.hpi.dialogue.protocol.response

Examples of org.hpi.dialogue.protocol.response.LogoffResponse


  }

  @Override
  public String execute(HPIClientProtocol clientProtocol) {
    // do logoff
    LogoffResponse logoffResponse = clientProtocol.doLogoff(this.getSessionId());
    if (logoffResponse.getStatus().equals(Response.Status.SUCCESS)) {
      return logoffResponse.getMessage();
    } else if (logoffResponse.getStatus().equals(Response.Status.FAIL)) {
      return logoffResponse.getMessage();
    } else throw new IllegalStateException("Unkonw the server's status code response");
  }
View Full Code Here


          invoker.getExecutables().add(executable);
        }
       
        return new DescribeInvokerResponse(invoker, responseMessage, responseStatus);
      } else if (serviceName.equals(HPIDialogueConstants.LOGOFF_SERVICE)) {
        return new LogoffResponse(responseMessage, responseStatus);
      } else if (serviceName.equals(HPIDialogueConstants.EXECUTE_INVOKER_SERVICE)) {
        return new ExecuteInvokerResponse(responseMessage, responseStatus);
      } else throw new RuntimeException("Unknow value to " + HPIDialogueConstants.SERVICE_NAME + ", the value is: " + serviceName);
    } else if (serviceType.equals(HPIDialogueConstants.REQUEST_SERVICE)) {
      if (serviceName.equals(HPIDialogueConstants.LOGIN_SERVICE)) {
View Full Code Here

          invoker.getExecutables().addElement(executable);
        }
       
        return new DescribeInvokerResponse(invoker, responseMessage, responseStatus);
      } else if (serviceName.equals(HPIDialogueConstants.LOGOFF_SERVICE)) {
        return new LogoffResponse(responseMessage, responseStatus);
      } else if (serviceName.equals(HPIDialogueConstants.EXECUTE_INVOKER_SERVICE)) {
        return new ExecuteInvokerResponse(responseMessage, responseStatus);
      } else throw new RuntimeException("Unknow value to " + HPIDialogueConstants.SERVICE_NAME + ", the value is: " + serviceName);
    } else if (serviceType.equals(HPIDialogueConstants.REQUEST_SERVICE)) {
      if (serviceName.equals(HPIDialogueConstants.LOGIN_SERVICE)) {
View Full Code Here

   * @return
   */
  private LogoffResponse doLogoff(LogoffRequest operation) {
    HPISessionManager sessionManager = HPISessionManager.getInstance();
    if (sessionManager.deleteSession(operation.getSessionId())) {
      return new LogoffResponse("The session was removed successfully.", Response.Status.SUCCESS);
    } else {
      return new LogoffResponse("No session was found to remove.", Response.Status.FAIL);
    }
  }
View Full Code Here

TOP

Related Classes of org.hpi.dialogue.protocol.response.LogoffResponse

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.