Examples of HPIDataFactory


Examples of org.hpi.data.factoy.HPIDataFactory

  private Response executeInvoker(ExecuteInvokerRequest clientRequest) {
    try {
      HPISessionManager sessionManager = HPISessionManager.getInstance();
      sessionManager.updateSession(clientRequest.getSessionId());
     
      HPIDataFactory dataFactory = HPIDataFactory.getInstance();
      Invoker invoker = dataFactory.getInvoker(clientRequest.getInvokeId());
     
      if (invoker != null) {
        ExecuteInvoker service = new ExecuteInvoker(invoker);
        String executionResult = service.runExecutables();
        return new ExecuteInvokerResponse(executionResult, Response.Status.SUCCESS);
View Full Code Here

Examples of org.hpi.data.factoy.HPIDataFactory

  private Response describeInvoker(DescribeInvokerRequest clientRequest) {
    Invoker invoker = null;
    try {
      HPISessionManager sessionManager = HPISessionManager.getInstance();
      sessionManager.updateSession(clientRequest.getSessionId());
      HPIDataFactory dataFactory = HPIDataFactory.getInstance();
      invoker = dataFactory.getInvoker(clientRequest.getInvokeId());
      if (invoker != null) {
        return new DescribeInvokerResponse(invoker, "Describe/consult invoker command executed successfully.", Response.Status.SUCCESS);
      } else {
        return new DescribeInvokerResponse(invoker, "No invoker was found for the id: " + clientRequest.getInvokeId(), Response.Status.FAIL);
      }
View Full Code Here

Examples of org.hpi.data.factoy.HPIDataFactory

  private ListInvokersResponse retrieveListInvokers(ListInvokersRequest request) {
    List<Invoker> listInvokers = null;
    try {
      HPISessionManager sessionManager = HPISessionManager.getInstance();
      sessionManager.updateSession(request.getSessionId());
      HPIDataFactory dataFactory = HPIDataFactory.getInstance();
      listInvokers = new ArrayList<Invoker>(dataFactory.getInvokers());
      return new ListInvokersResponse(listInvokers, "List invokers executed successfully.", Response.Status.SUCCESS);
    } catch (HPISessionException e) {
      return new ListInvokersResponse(listInvokers, "The session is not valid. " + e.getMessage(), Response.Status.FAIL);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.