Interface Crack

All Superinterfaces:
java.rmi.Remote
All Known Implementing Classes:
CrackImpl

public interface Crack
extends java.rmi.Remote

This interface defines the methods on the server that will be called by the client. All communication between client and serverare mediated via this interface. It has only on implementing class and requires only one.

Author:
zosima

Method Summary
 void elementSuccess(java.lang.String element)
          This method tells the server that a password has been correctly identified
 CrackProtocolFactory getProtocolFactory()
          Since protocols are dependent upon libraries that cannot be serialized a crackProtocolFactory is used to tell the client what type of protocol it should use.
 CrackWorkUnit getWorkUnit()
          This method gets a workUnit from the server, which contains a portion of the password domain and the necessary logic to track progress in testing segments of the domain
 boolean submitWorkUnit(CrackWorkUnit wu)
          When all the elements in a WorkUnit have been tested this method passes the WorkUnit back to the server so it can mark the elements inside the WorkUnit as checked.
 

Method Detail

getProtocolFactory

CrackProtocolFactory getProtocolFactory()
                                        throws java.rmi.RemoteException
Since protocols are dependent upon libraries that cannot be serialized a crackProtocolFactory is used to tell the client what type of protocol it should use. This method acquires it for the client.

Returns:
CrackProtocolFactory Instances of this class generate different varieties of protocols for password queries
Throws:
java.rmi.RemoteException - this exception signals a communication error

getWorkUnit

CrackWorkUnit getWorkUnit()
                          throws java.rmi.RemoteException
This method gets a workUnit from the server, which contains a portion of the password domain and the necessary logic to track progress in testing segments of the domain

Returns:
The next available workUnit, selected by the server according, basically in the same way an iterator or an enumerator selects the next item in a list
Throws:
java.rmi.RemoteException - this exception signals a communication error

elementSuccess

void elementSuccess(java.lang.String element)
                    throws java.rmi.RemoteException
This method tells the server that a password has been correctly identified

Parameters:
element - This element is typically a password, but any sort of data could be stored in the string, if someone wanted to use it with a more creative protocol
Throws:
java.rmi.RemoteException - this exception signals a communication error

submitWorkUnit

boolean submitWorkUnit(CrackWorkUnit wu)
                       throws java.rmi.RemoteException
When all the elements in a WorkUnit have been tested this method passes the WorkUnit back to the server so it can mark the elements inside the WorkUnit as checked.

Parameters:
wu - the completed workUnit
Returns:
true if submited successful, false otherwise
Throws:
java.rmi.RemoteException - this exception signals a communication error