Source code: com/fetish/directory/FetishServiceRegistration.java
1 package com.fetish.directory;
2
3 import net.jini.lookup.*;
4 import net.jini.core.lease.*;
5 import net.jini.core.lookup.*;
6 import net.jini.core.entry.*;
7 import java.rmi.RemoteException;
8 import com.fetish.directory.tool.*;
9
10 /**
11 * Wrapper for the Jini ServiceRegistration.
12 * <br>Provides a ServiceRegistration object that conceals several details
13 * whose direct manipulation is potentially hazardous for the integrity of
14 * the FADA.
15 */
16
17 public class FetishServiceRegistration implements ServiceRegistration,
18 java.io.Serializable {
19
20 private ServiceRegistration sr;
21 private FetishLeaseProxy fl;
22
23 public FetishServiceRegistration( ServiceRegistration sr, FetishLeaseProxy fl ) {
24 this.sr = sr;
25 this.fl = fl;
26 }
27
28 public ServiceID getServiceID() {
29 return this.sr.getServiceID();
30 }
31
32 public Lease getLease() {
33 return this.fl;
34 }
35
36 public void addAttributes( Entry[] attrSets ) throws UnknownLeaseException,
37 RemoteException {
38 this.sr.addAttributes( attrSets );
39 }
40
41 public void modifyAttributes(Entry[] attrSetTemplates,
42 Entry[] attrSets)
43 throws UnknownLeaseException, java.rmi.RemoteException {
44 this.sr.modifyAttributes( attrSetTemplates, attrSets );
45 }
46
47 public void setAttributes(Entry[] attrSets) throws UnknownLeaseException,
48 java.rmi.RemoteException {
49 this.sr.setAttributes( attrSets );
50 }
51 }