Package org.simplestructruedata.data

Examples of org.simplestructruedata.data.SSDContextManager


    public String getServiceType() {
        return HPIDialogueConstants.RESPONSE_SERVICE;
    }

    public SSDContextManager getSSDServiceMessage() {
        SSDContextManager ssdCtx = SSDContextManager.build();
        SSDObjectNode hpiMessage = new SSDObjectNode(HPIDialogueConstants.HPI_MESSAGE);
        hpiMessage.addAttribute(new SSDObjectLeaf(HPIDialogueConstants.SERVICE_TYPE, this.getServiceType()));
        hpiMessage.addAttribute(new SSDObjectLeaf(HPIDialogueConstants.SERVICE_NAME, this.getServiceName()));
        hpiMessage.addAttribute(new SSDObjectLeaf(HPIDialogueConstants.MESSAGE, this.getMessage()));
        hpiMessage.addAttribute(new SSDObjectLeaf(HPIDialogueConstants.STATUS, this.getStatus().toString()));
        hpiMessage.addAttribute(this.getSSDParameters());
        ssdCtx.getRootObject().addAttribute(hpiMessage);
        return ssdCtx;
    }
View Full Code Here


    return HPIDialogueConstants.RESPONSE_SERVICE;
  }
 
  @Override
  public SSDContextManager getSSDServiceMessage() {
    SSDContextManager ssdCtx = SSDContextManager.build();
    SSDObjectNode hpiMessage = new SSDObjectNode(HPIDialogueConstants.HPI_MESSAGE);
    hpiMessage.addAttribute(new SSDObjectLeaf(HPIDialogueConstants.SERVICE_TYPE, this.getServiceType()));
    hpiMessage.addAttribute(new SSDObjectLeaf(HPIDialogueConstants.SERVICE_NAME, this.getServiceName()));
    hpiMessage.addAttribute(new SSDObjectLeaf(HPIDialogueConstants.MESSAGE, this.getMessage()));
    hpiMessage.addAttribute(new SSDObjectLeaf(HPIDialogueConstants.STATUS, this.getStatus().toString()));
    hpiMessage.addAttribute(this.getSSDParameters());
    ssdCtx.getRootObject().addAttribute(hpiMessage);
    return ssdCtx;
  }
View Full Code Here

   * Method to parse a message and get a specific concrete Response or Request.
   * @param message
   * @return
   */
  public static HPIDialogueProtocol parseMessage(String message) {
    SSDContextManager ssdCtx = SSDContextManager.build(message);
    SSDRootObject root = ssdCtx.getRootObject();

    SSDObjectNode ssdHpiMessage = root.getNode(HPIDialogueConstants.HPI_MESSAGE);
    SSDObjectNode parameters = ssdHpiMessage.getNode(HPIDialogueConstants.PARAMETERS);
    String serviceType = ssdHpiMessage.getLeaf(HPIDialogueConstants.SERVICE_TYPE).getValue();
    String serviceName = ssdHpiMessage.getLeaf(HPIDialogueConstants.SERVICE_NAME).getValue();
View Full Code Here

   * Method to parse a message and get a specific concrete Response or Request.
   * @param message
   * @return
   */
  public static HPIDialogueProtocol parseMessage(String message) {
    SSDContextManager ssdCtx = SSDContextManager.build(message);
    SSDRootObject root = ssdCtx.getRootObject();

    SSDObjectNode ssdHpiMessage = root.getNode(HPIDialogueConstants.HPI_MESSAGE);
    SSDObjectNode parameters = ssdHpiMessage.getNode(HPIDialogueConstants.PARAMETERS);
    String serviceType = ssdHpiMessage.getLeaf(HPIDialogueConstants.SERVICE_TYPE).getValue();
    String serviceName = ssdHpiMessage.getLeaf(HPIDialogueConstants.SERVICE_NAME).getValue();
View Full Code Here

    public String getServiceType() {
        return HPIDialogueConstants.REQUEST_SERVICE;
    }

    public SSDContextManager getSSDServiceMessage() {
        SSDContextManager ssdCtx = SSDContextManager.build();
        SSDObjectNode hpiMessage = new SSDObjectNode(HPIDialogueConstants.HPI_MESSAGE);
        hpiMessage.addAttribute(new SSDObjectLeaf(HPIDialogueConstants.SERVICE_TYPE, this.getServiceType()));
        hpiMessage.addAttribute(new SSDObjectLeaf(HPIDialogueConstants.SERVICE_NAME, this.getServiceName()));
        hpiMessage.addAttribute(this.getSSDParameters());
        ssdCtx.getRootObject().addAttribute(hpiMessage);
        return ssdCtx;
    }
View Full Code Here

     
      // getting the settings file and its data to SSD context manager
      File settingsFile = new File(System.getProperty(HPIConstants.ENV_HPI_BASE) + System.getProperty("file.separator"), HPIConstants.CONFIGURATIONS_FILE_ADDRESS);
     
      log.info( "Looking for data settings at: " + settingsFile.getCanonicalPath());
      SSDContextManager ssdCtx = SSDContextManager.build(settingsFile);
      SSDRootObject ssdSettingsData = ssdCtx.getRootObject();
     
      // load the configuration and first data to FactoryManager and as well instatiating the data watcher to invokers folders
      InvokerDataLoader dataLoader = new InvokerDataLoader();
      dataLoader.startup(ssdSettingsData);
     
View Full Code Here

     
      // getting the settings file and its data to SSD context manager
      File settingsFile = new File(System.getProperty(HPIConstants.ENV_HPI_BASE) + System.getProperty("file.separator"), HPIConstants.CONFIGURATIONS_FILE_ADDRESS);
     
      log.info( "Shutdown looking for data settings at: " + settingsFile.getCanonicalPath());
      SSDContextManager ssdCtx = SSDContextManager.build(settingsFile);
      SSDRootObject ssdSettingsData = ssdCtx.getRootObject();

      SSDObjectNode ssdConfiguration = ssdSettingsData.getNode(HPIConstants.CONFIGURATIONS_CONFIG_SERVER);
      int portNumber = Integer.parseInt(ssdConfiguration.getLeaf(HPIConstants.CONFIGURATIONS_PORT_NUMBER).getValue());
      HPIClientProtocol clientProtocol = new HPIClientProtocol("127.0.0.1", portNumber);
      ServerShutdownResponse shutdownResponse = clientProtocol.serverShutdown();
View Full Code Here

      throw new IllegalArgumentException("The invokerFile is null or isn't a valid file.");
    }
   
    log.info("Adding a new invokerFile: " + invokerFile.getName());
   
    SSDContextManager ssdCtx = SSDContextManager.build(invokerFile);
    SSDRootObject root = ssdCtx.getRootObject();
   
    Invoker invoker = new Invoker(FileHelper.removeExtension(invokerFile.getName()));
    invoker.setDescription(root.getLeaf(HPIConstants.DESCRIPTION_INVOKER_FILE).getValue());
   
    SSDObjectArray ssdExecutables = root.getArray(HPIConstants.EXECUTABLES_INVOKER_FILE);
View Full Code Here

    return HPIDialogueConstants.REQUEST_SERVICE;
  }

  @Override
  public SSDContextManager getSSDServiceMessage() {
    SSDContextManager ssdCtx = SSDContextManager.build();
    SSDObjectNode hpiMessage = new SSDObjectNode(HPIDialogueConstants.HPI_MESSAGE);
    hpiMessage.addAttribute(new SSDObjectLeaf(HPIDialogueConstants.SERVICE_TYPE, this.getServiceType()));
    hpiMessage.addAttribute(new SSDObjectLeaf(HPIDialogueConstants.SERVICE_NAME, this.getServiceName()));
    hpiMessage.addAttribute(this.getSSDParameters());
    ssdCtx.getRootObject().addAttribute(hpiMessage);
    return ssdCtx;
  }
View Full Code Here

TOP

Related Classes of org.simplestructruedata.data.SSDContextManager

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.