コード例 #1
0
 @Override
 public void load() {
   super.load();
   // get root service broker
   ServiceBroker sb = getServiceBroker();
   NodeControlService ncs = sb.getService(this, NodeControlService.class, null);
   if (ncs == null) {
     throw new RuntimeException("Unable to obtain NodeControlService");
   }
   rootsb = ncs.getRootServiceBroker();
   sb.releaseService(this, NodeControlService.class, ncs);
   // advertise service
   _sfsp = new SFSP();
   _sfs = new SFS();
   rootsb.addService(SocketFactoryService.class, _sfsp);
 }
コード例 #2
0
ファイル: PersistSize.java プロジェクト: djw1149/cougaar-qos
  @Override
  public void load() {
    super.load();

    enabled = "true".equals(System.getProperty("org.cougaar.core.persistence.enable"));
    if (!enabled) {
      return;
    }

    NodeIdentificationService nis = sb.getService(this, NodeIdentificationService.class, null);
    nodeId = nis.getMessageAddress();
    sb.releaseService(this, NodeIdentificationService.class, nis);

    NodeControlService ncs = sb.getService(this, NodeControlService.class, null);
    ac = ncs.getRootContainer();
    sb.releaseService(this, NodeControlService.class, ncs);

    String installPath = System.getProperty("org.cougaar.install.path", "/tmp");
    String workspaceDir = System.getProperty("org.cougaar.workspace", installPath + "/workspace");
    baseDir = workspaceDir + "/P";
  }