|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.melati.login.CommandLineAccessHandler
public class CommandLineAccessHandler
A handler invoked when an AccessPoemException
is thrown.
If the application is invoked without a username and password on the command
line then the user will be prompted for them.
If the usename is supplied then the user will not be prompted as this migth
interfere with use in a scripting environment.
AccessHandler
Constructor Summary | |
---|---|
CommandLineAccessHandler()
Constructor. |
Method Summary | |
---|---|
void |
buildRequest(Melati melati)
A no-op in a command line application. |
Melati |
establishUser(Melati melati)
Called when the PoemTask is initialised, recalled after a login. |
void |
handleAccessException(Melati melati,
AccessPoemException accessException)
Actually handle the AccessPoemException . |
void |
setInput(InputStream input)
|
void |
setOutput(PrintStream output)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CommandLineAccessHandler()
Method Detail |
---|
public void handleAccessException(Melati melati, AccessPoemException accessException) throws Exception
AccessPoemException
.
Deal with an AccessPoemException, often by allowing login.
handleAccessException
in interface AccessHandler
melati
- current MelatiaccessException
- the AccessException
Exception
(org.melati.Melati, org.melati.poem.AccessPoemException)
public Melati establishUser(Melati melati)
establishUser
in interface AccessHandler
Melati
with the appropriate fields filled.AccessHandler.establishUser(org.melati.Melati)
public void buildRequest(Melati melati) throws MelatiException, IOException
buildRequest
in interface AccessHandler
melati
- used to hold original request
MelatiException
IOException
AccessHandler.buildRequest(org.melati.Melati)
public void setInput(InputStream input)
input
- The input to set.public void setOutput(PrintStream output)
output
- The output to set.
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |