autohit.verify
Class HTTPVerify

java.lang.Object
  |
  +--autohit.verify.HTTPVerify

public class HTTPVerify
extends java.lang.Object
implements Verify

A simple HTTP Verify implementation.

Current issues:
1- Doesn't handle 'serious' encodings.


Constructor Summary
HTTPVerify()
          Default constructor.
 
Method Summary
 boolean crc(int expected)
          A CRC check operation.
 boolean exec(java.lang.String invocation, java.lang.String content)
          Run a sub-executable to perform a verification.
 void fresh(Response context)
          Create a fresh verification context.
 int lastDelta()
          Returns the numeric difference from the previous operation.
 void reset()
          Reset the current verification context.
 boolean seek(java.lang.String expected)
          A seek operation.
 boolean size(int expected)
          A size check operation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTTPVerify

public HTTPVerify()
Default constructor.
Method Detail

fresh

public void fresh(Response context)
           throws VerifyException
Create a fresh verification context.
Specified by:
fresh in interface Verify
Parameters:
address - Address specification.
Throws:
autohit.transport.VerifyException -  

reset

public void reset()
           throws VerifyException
Reset the current verification context.
Specified by:
reset in interface Verify
Parameters:
address - Address specification.
Throws:
autohit.transport.VerifyException -  

seek

public boolean seek(java.lang.String expected)
             throws VerifyException
A seek operation.

This will always return true if the expected string is empty.

Specified by:
seek in interface Verify
Parameters:
expected - the string to seek.
Returns:
true if it passes verification,otherwise false.
Throws:
autohit.transport.VerifyException -  

crc

public boolean crc(int expected)
            throws VerifyException
A CRC check operation.
Specified by:
crc in interface Verify
Parameters:
expected - the expected CRC value.
Returns:
true if it passes verification,otherwise false.
Throws:
autohit.transport.VerifyException -  

size

public boolean size(int expected)
             throws VerifyException
A size check operation.
Specified by:
size in interface Verify
Parameters:
expected - the expected size.
Returns:
true if it passes verification,otherwise false.
Throws:
autohit.transport.VerifyException -  

lastDelta

public int lastDelta()
              throws VerifyException
Returns the numeric difference from the previous operation. Currently, if will return the diff between the expected and actual values calculated in crc and size.

It is calculated as actual - expected.

Specified by:
lastDelta in interface Verify
Returns:
numeric delta. It will be 0, if there was no difference.
Throws:
autohit.transport.VerifyException -  

exec

public boolean exec(java.lang.String invocation,
                    java.lang.String content)
             throws VerifyException
Run a sub-executable to perform a verification.

Scrubbed for now... I need to ponder this entire mechanism. It will always return TRUE.

Specified by:
exec in interface Verify
Parameters:
invocation - an invocation string. used by the specific verification to determine what to run and how to run it.
content - passed to the sun-executable as content.
Returns:
true if it passes verification,otherwise false.
Throws:
autohit.transport.VerifyException -