jaugment2.jini.simpleService
Class simpleAdministrator

java.lang.Object
  |
  +--java.rmi.server.RemoteObject
        |
        +--java.rmi.server.RemoteServer
              |
              +--java.rmi.server.UnicastRemoteObject
                    |
                    +--jaugment2.jini.simpleService.simpleAdministrator
Direct Known Subclasses:
SimpleRepresentedAdministrator

public class simpleAdministrator
extends java.rmi.server.UnicastRemoteObject
implements net.jini.admin.JoinAdmin, com.sun.jini.admin.DestroyAdmin, StoppableAdmin, java.rmi.Remote, com.sun.jini.admin.StorageLocationAdmin

a simple base for an administrator-object

See Also:
Serialized Form

Field Summary
private  com.sun.jini.admin.DestroyAdmin destroy
           
private  net.jini.lookup.JoinManager jmngr
           
private  net.jini.discovery.LookupDiscoveryManager ldm
           
private  Savable save
           
private  StoppableAdmin stoppable
           
private  com.sun.jini.admin.StorageLocationAdmin store
           
 
Fields inherited from class java.rmi.server.UnicastRemoteObject
csf, port, portFactoryParamTypes, portParamTypes, serialVersionUID, ssf
 
Fields inherited from class java.rmi.server.RemoteServer
log, logname, serialVersionUID
 
Fields inherited from class java.rmi.server.RemoteObject
ref, serialVersionUID
 
Constructor Summary
simpleAdministrator(net.jini.discovery.LookupDiscoveryManager ldm, net.jini.lookup.JoinManager jmngr, com.sun.jini.admin.DestroyAdmin des, StoppableAdmin stop, Savable save, com.sun.jini.admin.StorageLocationAdmin store)
           
simpleAdministrator(simpleService serv)
           
 
Method Summary
 void addLookupAttributes(net.jini.core.entry.Entry[] attrSets)
          Add attribute sets for the service.
 void addLookupGroups(java.lang.String[] groups)
          Add new groups to the set to join.
 void addLookupLocators(net.jini.core.discovery.LookupLocator[] locators)
          Add locators for specific new lookup services to join.
 void destroy()
          Destroy the service, if possible, including its persistent storage.
 net.jini.core.entry.Entry[] getLookupAttributes()
          Get the current attribute sets for the service.
 java.lang.String[] getLookupGroups()
          Get the list of groups to join.
 net.jini.core.discovery.LookupLocator[] getLookupLocators()
          Get the list of locators of specific lookup services to join.
 java.lang.String getStorageLocation()
          Get the location of persistent storage
 void modifyLookupAttributes(net.jini.core.entry.Entry[] attrSetTemplates, net.jini.core.entry.Entry[] attrSets)
          Modify the current attribute sets, using the same semantics as ServiceRegistration.modifyAttributes.
 void removeLookupGroups(java.lang.String[] groups)
          Remove groups from the set to join.
 void removeLookupLocators(net.jini.core.discovery.LookupLocator[] locators)
          Remove locators for specific lookup services from the set to join.
 void restart()
          restart this service once it has been stopped
 void setLookupGroups(java.lang.String[] groups)
          Replace the list of groups to join with a new list.
 void setLookupLocators(net.jini.core.discovery.LookupLocator[] locators)
          Replace the list of locators of specific lookup services to join with a new list.
 void setStorageLocation(java.lang.String p0)
          Set the location of persistent storage
 void stop(boolean exit)
          stop this service.
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
, clone, exportObject, exportObject, exportObject, exportObject, readObject, reexport, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub, writeObject
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

ldm

private net.jini.discovery.LookupDiscoveryManager ldm

jmngr

private net.jini.lookup.JoinManager jmngr

destroy

private com.sun.jini.admin.DestroyAdmin destroy

stoppable

private StoppableAdmin stoppable

store

private com.sun.jini.admin.StorageLocationAdmin store

save

private Savable save
Constructor Detail

simpleAdministrator

public simpleAdministrator(net.jini.discovery.LookupDiscoveryManager ldm,
                           net.jini.lookup.JoinManager jmngr,
                           com.sun.jini.admin.DestroyAdmin des,
                           StoppableAdmin stop,
                           Savable save,
                           com.sun.jini.admin.StorageLocationAdmin store)
                    throws java.rmi.RemoteException

simpleAdministrator

public simpleAdministrator(simpleService serv)
                    throws java.rmi.RemoteException
Method Detail

getStorageLocation

public java.lang.String getStorageLocation()
                                    throws java.rmi.RemoteException
Get the location of persistent storage
Specified by:
getStorageLocation in interface com.sun.jini.admin.StorageLocationAdmin

setStorageLocation

public void setStorageLocation(java.lang.String p0)
                        throws java.io.IOException,
                               java.rmi.RemoteException
Set the location of persistent storage
Specified by:
setStorageLocation in interface com.sun.jini.admin.StorageLocationAdmin

restart

public void restart()
             throws java.lang.Exception
restart this service once it has been stopped
Specified by:
restart in interface StoppableAdmin
See Also:
stop

stop

public void stop(boolean exit)
          throws java.lang.Exception
stop this service. If exit is false all references to this service are still valid but it has deregistered everywhere. (this includes the RMI-activation-daemon)
Specified by:
stop in interface StoppableAdmin
Parameters:
exit - stop running
See Also:
restart, destroy

destroy

public void destroy()
             throws java.rmi.RemoteException
Destroy the service, if possible, including its persistent storage. This method will typically spawn a separate thread to do the actual work asynchronously, so a successful return from this method usually does not mean that the service has been destroyed.
Specified by:
destroy in interface com.sun.jini.admin.DestroyAdmin

getLookupAttributes

public net.jini.core.entry.Entry[] getLookupAttributes()
                                                throws java.rmi.RemoteException
Get the current attribute sets for the service.
Specified by:
getLookupAttributes in interface net.jini.admin.JoinAdmin
Returns:
the current attribute sets for the service
Throws:
java.rmi.RemoteException -  

addLookupAttributes

public void addLookupAttributes(net.jini.core.entry.Entry[] attrSets)
                         throws java.rmi.RemoteException
Add attribute sets for the service. The resulting set will be used for all future joins. The attribute sets are also added to all currently-joined lookup services.
Specified by:
addLookupAttributes in interface net.jini.admin.JoinAdmin
Parameters:
attrSets - the attribute sets to add
Throws:
java.rmi.RemoteException -  

modifyLookupAttributes

public void modifyLookupAttributes(net.jini.core.entry.Entry[] attrSetTemplates,
                                   net.jini.core.entry.Entry[] attrSets)
                            throws java.rmi.RemoteException
Modify the current attribute sets, using the same semantics as ServiceRegistration.modifyAttributes. The resulting set will be used for all future joins. The same modifications are also made to all currently-joined lookup services.
Specified by:
modifyLookupAttributes in interface net.jini.admin.JoinAdmin
Parameters:
attrSetTemplates - the templates for matching attribute sets
attrSets - the modifications to make to matching sets
Throws:
java.rmi.RemoteException -  
See Also:
ServiceRegistration.modifyAttributes(net.jini.core.entry.Entry[], net.jini.core.entry.Entry[])

getLookupGroups

public java.lang.String[] getLookupGroups()
                                   throws java.rmi.RemoteException
Get the list of groups to join. An empty array means the service joins no groups (as opposed to "all" groups).
Specified by:
getLookupGroups in interface net.jini.admin.JoinAdmin
Returns:
an array of groups to join. An empty array means the service joins no groups (as opposed to "all" groups).
Throws:
java.rmi.RemoteException -  

addLookupGroups

public void addLookupGroups(java.lang.String[] groups)
                     throws java.rmi.RemoteException
Add new groups to the set to join. Lookup services in the new groups will be discovered and joined.
Specified by:
addLookupGroups in interface net.jini.admin.JoinAdmin
Parameters:
groups - groups to join
Throws:
java.rmi.RemoteException -  

removeLookupGroups

public void removeLookupGroups(java.lang.String[] groups)
                        throws java.rmi.RemoteException
Remove groups from the set to join. Leases are cancelled at lookup services that are not members of any of the remaining groups.
Specified by:
removeLookupGroups in interface net.jini.admin.JoinAdmin
Parameters:
groups - groups to leave
Throws:
java.rmi.RemoteException -  

setLookupGroups

public void setLookupGroups(java.lang.String[] groups)
                     throws java.rmi.RemoteException
Replace the list of groups to join with a new list. Leases are cancelled at lookup services that are not members of any of the new groups. Lookup services in the new groups will be discovered and joined.
Specified by:
setLookupGroups in interface net.jini.admin.JoinAdmin
Parameters:
groups - groups to join
Throws:
java.rmi.RemoteException -  

getLookupLocators

public net.jini.core.discovery.LookupLocator[] getLookupLocators()
                                                          throws java.rmi.RemoteException
Get the list of locators of specific lookup services to join.
Specified by:
getLookupLocators in interface net.jini.admin.JoinAdmin
Returns:
the list of locators of specific lookup services to join
Throws:
java.rmi.RemoteException -  

addLookupLocators

public void addLookupLocators(net.jini.core.discovery.LookupLocator[] locators)
                       throws java.rmi.RemoteException
Add locators for specific new lookup services to join. The new lookup services will be discovered and joined.
Specified by:
addLookupLocators in interface net.jini.admin.JoinAdmin
Parameters:
locators - locators of specific lookup services to join
Throws:
java.rmi.RemoteException -  

removeLookupLocators

public void removeLookupLocators(net.jini.core.discovery.LookupLocator[] locators)
                          throws java.rmi.RemoteException
Remove locators for specific lookup services from the set to join. Any leases held at the lookup services are cancelled.
Specified by:
removeLookupLocators in interface net.jini.admin.JoinAdmin
Parameters:
locators - locators of specific lookup services to leave
Throws:
java.rmi.RemoteException -  

setLookupLocators

public void setLookupLocators(net.jini.core.discovery.LookupLocator[] locators)
                       throws java.rmi.RemoteException
Replace the list of locators of specific lookup services to join with a new list. Leases are cancelled at lookup services that were in the old list but are not in the new list. Any new lookup services will be discovered and joined.
Specified by:
setLookupLocators in interface net.jini.admin.JoinAdmin
Parameters:
locators - locators of specific lookup services to join
Throws:
java.rmi.RemoteException -