com.jaccal.console
Class Anubis

java.lang.Object
  extended bycom.jaccal.console.Anubis

public class Anubis
extends Object

A convenience class for Anubis scripts. Anubis wraps around most of the useful methods used in Jaccal. Anubis contains a default session that is created from the SessionFactory. If you need to access more than one card at the same time, you will need to create the sessions yourself.

Author:
Chang Sau Sheong

Field Summary
(package private)  ErrorTab error
           
(package private)  SessionFactory factory
           
(package private)  OutputTab output
           
(package private)  Session session
           
 
Constructor Summary
Anubis(OutputTab output, ErrorTab error)
           
 
Method Summary
 void breakpoint()
          Adds a breakpoint to the script
 void breakpoint(String label)
          Adds a breakpoint to the script
 void breakpoint(String label, String message)
          Adds a breakpoint to the script
 void close()
          Closes the default session
 void error(Object toPrint)
          Adds an error message to the error tab
 CardResponse execute(Command cmd)
          Executes the APDU command
 Atr open()
          Opens the default session
 void pause()
          Pauses the script until the user clicks on OK
 void pause(String message)
          Pauses the script until the user clicks on OK
 void print(Object toPrint)
          Prints to the output tab
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

factory

SessionFactory factory

session

Session session

output

OutputTab output

error

ErrorTab error
Constructor Detail

Anubis

public Anubis(OutputTab output,
              ErrorTab error)
Method Detail

open

public Atr open()
Opens the default session

Returns:
An Atr object

close

public void close()
Closes the default session


execute

public CardResponse execute(Command cmd)
                     throws CardException
Executes the APDU command

Parameters:
cmd - the Command object to be executed
Returns:
A CardResponse object
Throws:
CardException

print

public void print(Object toPrint)
Prints to the output tab

Parameters:
toPrint - The text to print. Any objects that is passed in as a parameter will be converted to String using toString()

error

public void error(Object toPrint)
Adds an error message to the error tab

Parameters:
toPrint -

pause

public void pause(String message)
Pauses the script until the user clicks on OK

Parameters:
message - This is the message on the dialog box

pause

public void pause()
Pauses the script until the user clicks on OK


breakpoint

public void breakpoint()
                throws BreakPointException
Adds a breakpoint to the script

Throws:
BreakPointException - Throws a breakpoint exception to halt the execution of the script

breakpoint

public void breakpoint(String label)
                throws BreakPointException
Adds a breakpoint to the script

Parameters:
label - his is the label of the message dialog that is shown at the breakpoint
Throws:
BreakPointException - Throws a breakpoint exception to halt the execution of the script

breakpoint

public void breakpoint(String label,
                       String message)
                throws BreakPointException
Adds a breakpoint to the script

Parameters:
label - This is the label of the message dialog that is shown at the breakpoint
message - This is the message of the message dialog that is shown at the breakpoint
Throws:
BreakPointException - Throws a breakpoint exception to halt the execution of the script


Copyright © 2005 Chang Sau Sheong, Thomas Tarpin-Lyonnet. All Rights Reserved.