Package com.almende.eve.state

Examples of com.almende.eve.state.StateConfig


   * @param sc
   *            the sc
   */
  public void loadState(final ObjectNode sc) {
    if (sc != null) {
      final StateConfig stateConfig = new StateConfig(sc);
      if (agentId != null && stateConfig.getId() == null) {
        stateConfig.setId(agentId);
      }
      state = new StateBuilder().withConfig(stateConfig).build();
      config.put("state", stateConfig);
    }
  }
View Full Code Here


  private static final Map<String, WakeService>  SERVICES  = new HashMap<String, WakeService>();
 
  @Override
  public WakeService build(){
    final WakeServiceConfig config = new WakeServiceConfig(getParams());
    final String id = new StateConfig(config.getState()).getId();
   
    WakeService service = null;
    if (SERVICES.containsKey(id)) {
      service = SERVICES.get(id);
    }
View Full Code Here

   *            the scheduler config
   */
  public void loadScheduler(final ObjectNode schedulerConfig) {
    if (schedulerConfig != null) {
      if (agentId != null && schedulerConfig.has("state")) {
        final StateConfig stateConfig = new StateConfig(
            (ObjectNode) schedulerConfig.get("state"));
       
        if (stateConfig.getId() == null) {
          stateConfig.setId("scheduler_" + agentId);
        }
      }
      scheduler = new SchedulerBuilder().withConfig(schedulerConfig)
          .withHandle(receiver).build();
     
View Full Code Here

     *            the params
     * @return the mongo state
     */
    public MongoState get(final ObjectNode params) {
     
      final StateConfig config = new StateConfig(params);
      final String id = config.getId();
     
     
      MongoState result = null;
      try {
        synchronized (this) {
View Full Code Here

TOP

Related Classes of com.almende.eve.state.StateConfig

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.