summaryrefslogtreecommitdiff
path: root/java/src/RemoveNode.java
blob: d93a0911054dd1c678f8ebe94f74322775db8e00 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*************************************************
 *
 * = PACKAGE
 *    JACE.ServiceConfigurator
 *
 * = FILENAME
 *    RemoveNode.java
 *
 * Used when a service is specified to be removed based on a line
 * in a service configurator file.  Note:  Make sure to call the
 * prepareToReload method in ServiceConfig before reloading the
 * service that is being removed.
 *
 *@author Everett Anderson
 *
 *************************************************/
package JACE.ServiceConfigurator;

import java.io.*;
import JACE.ServiceConfigurator.*;
import JACE.OS.*;
import java_cup.runtime.*;

class RemoveNode extends ParseNode
{
  public RemoveNode (int act_num)
  {
    super(act_num);
  }  

  public void apply () 
  {
    ACE.DEBUG("RemoveNode apply");

    if (JACE.ServiceConfigurator.ServiceConfig.remove(this.name_) == -1)
      ACE.ERROR("Error removing " + this.name_);
  }
};