summaryrefslogtreecommitdiff
path: root/java/src/ServiceObject.java
blob: 5d27c0f0d2fcd2187e47be073f2b3c232733e537 (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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/*************************************************
 *
 * = PACKAGE
 *    ACE.ServiceConfigurator
 *
 * = FILENAME
 *    ServiceObject.java
 *
 *@author Prashant Jain
 *
 *************************************************/
package ACE.ServiceConfigurator;

import java.io.*;
import ACE.ASX.*;
import ACE.Reactor.*;

public class ServiceObject implements EventHandler
{
  /**
   * Initialize object when dynamic loading occurs. Overwrite this
   * method to do anything useful. 
   *@return -1 (default implementation)
   */
  public int init (String [] args)
  {
    return -1;
  }

  /** 
   * Terminate the object. Note that an object can not be explicitly
   * unloaded. Overwrite this method to do anything useful.
   *@return -1 (default implementation)
   */
  public int fini ()
  {
    return -1;
  }

  /**
   * Get information on an active object. Overwrite this method to do
   * anything useful. 
   *@return null (default implementation)
   */
  public String info ()
  {
    return null;
  }

  /** 
   * Called when timer expires. Overwrite this method to do
   * anything useful. 
   *@param tv Time Value for which timer was set
   *@param obj An arbitrary object that was passed to the Timer Queue
   * (Asynchronous Completion Token)
   *@return -1
   */
  public int handleTimeout (TimeValue tv, Object obj)
  {
    return -1;
  }
}