jaugment2.password
Class PasswordService

java.lang.Object
  |
  +--java.rmi.server.RemoteObject
        |
        +--java.rmi.server.RemoteServer
              |
              +--java.rmi.server.UnicastRemoteObject
                    |
                    +--jaugment2.jini.simpleService.simpleService
                          |
                          +--jaugment2.password.PasswordService

public class PasswordService
extends simpleService
implements java.rmi.Remote

A Service, that helps people remember passwords

See Also:
Serialized Form

Inner classes inherited from class jaugment2.jini.simpleService.simpleService
simpleService.myServiceIDListener
 
Field Summary
private  java.util.Hashtable pwds
           
 
Fields inherited from class jaugment2.jini.simpleService.simpleService
bindings, fallback_attrSets, jmngr, ldm, lrm, persistentState, proxy, sid, simpleservicedebugMessages
 
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
PasswordService()
           
PasswordService(net.jini.core.discovery.LookupLocator firstLocator)
           
 
Method Summary
 void destroy()
          stop this service, destroy any persistent storage and exit
 java.lang.String getPassword(java.lang.String identifier, byte[] masterPWD)
          Get the given password out of the list
 java.lang.String[] getPasswordIdentifiers(byte[] masterPWD)
           
private  void loadMe()
           
 void restart()
          restart this service once it has been stopped
 void setMasterPassword(byte[] newMasterPWD, byte[] masterPWD)
          Set the master-password
 java.lang.String setPassword(java.lang.String identifier, java.lang.String password, byte[] masterPWD)
          Set the given password
 void stop(boolean exit)
          stop this service.
private  boolean testMaster(byte[] masterPWD)
           
 
Methods inherited from class jaugment2.jini.simpleService.simpleService
, deinit, deinitBindings, finalize, getProxy, getServiceItem, getStorageLocation, init, initBindings, initBindings, load, save, setStorageLocation
 
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
getClass, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

pwds

private java.util.Hashtable pwds
Constructor Detail

PasswordService

public PasswordService()
                throws java.rmi.RemoteException

PasswordService

public PasswordService(net.jini.core.discovery.LookupLocator firstLocator)
                throws java.rmi.RemoteException
Method Detail

restart

public void restart()
             throws java.lang.Exception
restart this service once it has been stopped
Overrides:
restart in class simpleService
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)
Overrides:
stop in class simpleService
Parameters:
exit - stop running
See Also:
restart, destroy

destroy

public void destroy()
             throws java.rmi.RemoteException
stop this service, destroy any persistent storage and exit
Overrides:
destroy in class simpleService

loadMe

private void loadMe()

testMaster

private boolean testMaster(byte[] masterPWD)

getPassword

public java.lang.String getPassword(java.lang.String identifier,
                                    byte[] masterPWD)
                             throws java.rmi.RemoteException,
                                    java.lang.IllegalArgumentException,
                                    java.lang.IllegalStateException
Get the given password out of the list
Throws:
java.lang.IllegalArgumentException - if the masterPWD was wrong

getPasswordIdentifiers

public java.lang.String[] getPasswordIdentifiers(byte[] masterPWD)
                                          throws java.rmi.RemoteException,
                                                 java.lang.IllegalArgumentException,
                                                 java.lang.IllegalStateException

setPassword

public java.lang.String setPassword(java.lang.String identifier,
                                    java.lang.String password,
                                    byte[] masterPWD)
                             throws java.rmi.RemoteException,
                                    java.lang.IllegalArgumentException
Set the given password
Throws:
java.lang.IllegalArgumentException - if the masterPWD was wrong

setMasterPassword

public void setMasterPassword(byte[] newMasterPWD,
                              byte[] masterPWD)
                       throws java.rmi.RemoteException,
                              java.lang.IllegalArgumentException
Set the master-password
Throws:
java.lang.IllegalArgumentException - if the masterPWD was wrong