1 package org.apache.jcs.auxiliary.remote.behavior;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import java.io.IOException;
23
24 import java.rmi.Remote;
25
26 import org.apache.jcs.engine.behavior.ICacheListener;
27
28 /***
29 * Listens for remote cache event notification ( rmi callback ).
30 */
31 public interface IRemoteCacheListener
32 extends ICacheListener, Remote
33 {
34 /*** SERVER_LISTENER -- for the cluster */
35 public final static int SERVER_LISTENER = 0;
36
37 /*** CLIENT_LISTENER -- these aren't used any longer. remove*/
38 public final static int CLIENT_LISTENER = 1;
39
40 /***
41 * Get the id to be used by this manager.
42 * <p>
43 * @return long
44 * @throws IOException
45 */
46 public long getListenerId()
47 throws IOException;
48
49 /***
50 * Set the id to be used by this manager. The remote cache server identifies clients by this id.
51 * The value will be set by the server through the remote cache listener.
52 * <p>
53 * @param id
54 * @throws IOException
55 */
56 public void setListenerId( long id )
57 throws IOException;
58
59 /***
60 * Gets the remoteType attribute of the IRemoteCacheListener object
61 * <p>
62 * @return The remoteType value
63 * @throws IOException
64 */
65 public int getRemoteType()
66 throws IOException;
67
68 /***
69 * This is for debugging. It allows the remote cache server to log the address of any listeners
70 * that regiser.
71 * <p>
72 * @return the local host address.
73 * @throws IOException
74 */
75 public String getLocalHostAddress()
76 throws IOException;
77
78 /***
79 * Deregisters itself.
80 * <p>
81 * @throws IOException
82 */
83 public void dispose()
84 throws IOException;
85
86 }