org.jivesoftware.util
Interface Verification<T extends Packet,S extends Packet>

Type Parameters:
T - class of the request
S - class of the response

public interface Verification<T extends Packet,S extends Packet>

Implement this interface to verify a request/response pair.

For convenience there are some useful predefined implementations.

Author:
Henning Staib

Field Summary
static Verification<Packet,Packet> correspondingSenderReceiver
          Verifies that the "To" field of the request corresponds with the "From" field of the response.
static Verification<IQ,Packet> requestTypeERROR
          Verifies that the type of the request is an ERROR.
static Verification<IQ,Packet> requestTypeGET
          Verifies that the type of the request is a GET.
static Verification<IQ,Packet> requestTypeRESULT
          Verifies that the type of the request is a RESULT.
static Verification<IQ,Packet> requestTypeSET
          Verifies that the type of the request is a SET.
 
Method Summary
 void verify(T request, S response)
          Implement this method to make assertions of the request/response pairs.
 

Field Detail

correspondingSenderReceiver

static final Verification<Packet,Packet> correspondingSenderReceiver
Verifies that the "To" field of the request corresponds with the "From" field of the response.


requestTypeGET

static final Verification<IQ,Packet> requestTypeGET
Verifies that the type of the request is a GET.


requestTypeSET

static final Verification<IQ,Packet> requestTypeSET
Verifies that the type of the request is a SET.


requestTypeRESULT

static final Verification<IQ,Packet> requestTypeRESULT
Verifies that the type of the request is a RESULT.


requestTypeERROR

static final Verification<IQ,Packet> requestTypeERROR
Verifies that the type of the request is an ERROR.

Method Detail

verify

void verify(T request,
            S response)
Implement this method to make assertions of the request/response pairs.

Parameters:
request - the request collected by the mocked XMPP connection
response - the response added to the protocol instance