nl.nikhef.slcshttps
Class SURFCAHttps.StdioComm

java.lang.Object
  extended by nl.nikhef.slcshttps.SURFCAHttps.StdioComm
All Implemented Interfaces:
SURFCAHttps.SURFCACommunicator
Enclosing class:
SURFCAHttps

static class SURFCAHttps.StdioComm
extends Object
implements SURFCAHttps.SURFCACommunicator

Implementation of a SURFCAHttps.SURFCACommunicator using simple text via stdin/stderr/stdout.

See Also:
SURFCAHttps.SURFCACommunicator

Constructor Summary
SURFCAHttps.StdioComm()
           
 
Method Summary
 void error(String text, Exception e)
          Called upon error.
 void postBrowse()
          Called just after the webbrowser is started, prints a text and waits for confirmation, effectively blocking execution until the user is ready with the webbrowser.
 void preBrowse()
          Called just before the webbrowser is started, prints a text and waits for confirmation.
 boolean retry(String text, Exception e)
          Identical to error(String,Exception) except that it is called when an error occurs that might be fixed by the user.
 void success(String text)
          It is called when interaction has been successful and the certificate stored, when SURFCAHttps.getShowSuccess() equals true, it will then print a confirmation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SURFCAHttps.StdioComm

SURFCAHttps.StdioComm()
Method Detail

preBrowse

public void preBrowse()
               throws IOException
Called just before the webbrowser is started, prints a text and waits for confirmation.

Specified by:
preBrowse in interface SURFCAHttps.SURFCACommunicator
Throws:
IOException

postBrowse

public void postBrowse()
                throws IOException
Called just after the webbrowser is started, prints a text and waits for confirmation, effectively blocking execution until the user is ready with the webbrowser.

Specified by:
postBrowse in interface SURFCAHttps.SURFCACommunicator
Throws:
IOException

error

public void error(String text,
                  Exception e)
Called upon error. It prints an error string using the text and Throwable.getMessage() from e (if non-null) on stderr, any HTML italics tags are removed.

Specified by:
error in interface SURFCAHttps.SURFCACommunicator
Parameters:
text - String - some descriptive text.
e - Exception that caused the error (if any).
See Also:
SURFCAHttps.SURFCACommunicator.retry(String,Exception)

retry

public boolean retry(String text,
                     Exception e)
Identical to error(String,Exception) except that it is called when an error occurs that might be fixed by the user. (S)He can then choose to retry.

Specified by:
retry in interface SURFCAHttps.SURFCACommunicator
Parameters:
text - String - some text.
e - Exception that caused the error (if any).
Returns:
boolean whether or not the user wishes to retry.
See Also:
error(String,Exception)

success

public void success(String text)
It is called when interaction has been successful and the certificate stored, when SURFCAHttps.getShowSuccess() equals true, it will then print a confirmation.

Specified by:
success in interface SURFCAHttps.SURFCACommunicator
Parameters:
text - String - text describing the certificate subject.


nl.nikhef.slcshttps Mischa Sallé - msalle(AT)nikhef.nl