jSyncManager Simple Java Server

org.jSyncManager.SJS.Adapters.SMTPServer.contracts
Class SMTPServerContract

java.lang.Object
  extended by net.sourceforge.c4j.ContractBase<SMTPServer>
      extended by org.jSyncManager.SJS.Adapters.SMTPServer.contracts.SMTPServerContract

public class SMTPServerContract
extends net.sourceforge.c4j.ContractBase<SMTPServer>

This class specifies the contracts for relevant methods of the SMTPServer class.

Author:
akaspar

Field Summary
(package private)  SMTPServer server
          The server class being checked
 
Fields inherited from class net.sourceforge.c4j.ContractBase
m_target
 
Constructor Summary
SMTPServerContract(SMTPServer server)
          Creates a new SMTPServerContract for the passed server object (this is handled automatically) by the library
 
Method Summary
 void classInvariant()
          Specifies the states of the server that should never change.
 void post_checkAddress(java.lang.String addr)
          Check to ensure that the server always returns a response (if there is a problem, it should return an error string, never null).
 void post_getDomains()
          Check to ensure that the server always returns a response (if there is a problem, it should return an error string, never null).
 void post_getUsers()
          Check to ensure that the server always returns a response (if there is a problem, it should return an error string, never null).
 void post_processData()
          Check to ensure that the server always returns a response (if there is a problem, it should return an error string, never null).
 void post_processExpn(java.lang.String args)
          Check to ensure that the server always returns a response (if there is a problem, it should return an error string, never null).
 void post_processHelo(java.lang.String args)
          Check to ensure that the server always returns a response (if there is a problem, it should return an error string, never null).
 void post_processHelp(java.lang.String args)
          Check to ensure that the server always returns a response (if there is a problem, it should return an error string, never null).
 void post_processMail(java.lang.String args)
          Check to ensure that the server always returns a response (if there is a problem, it should return an error string, never null).
 void post_processMessageFinished()
          Check to ensure that the server always returns a response (if there is a problem, it should return an error string, never null).
 void post_processNoop()
          Check to ensure that the server always returns a response (if there is a problem, it should return an error string, never null).
 void post_processQuit()
          Check to ensure that the server always returns a response (if there is a problem, it should return an error string, never null).
 void post_processRcpt(java.util.List<java.lang.String> relays, java.lang.String addr)
          Check to ensure that the server always returns a response (if there is a problem, it should return an error string, never null).
 void pre_checkAddress(java.lang.String addr)
          Code doesn't check to ensure that addr is not null, so it is checked in this contract.
 void pre_getAddress(java.lang.String address)
          Code doesn't check to ensure that address is not null, so it is checked in this contract.
 void pre_processEhlo(java.lang.String args)
          Code doesn't check to ensure that args is not null, so it is checked in this contract.
 void pre_processExpn(java.lang.String args)
          Code doesn't check to ensure that args is not null, so it is checked in this contract.
 void pre_processHelo(java.lang.String args)
          Code doesn't check to ensure that args is not null, so it is checked in this contract.
 void pre_processRcpt(java.util.List<java.lang.String> relays, java.lang.String addr)
          ¥ÊCode doesn't check to ensure that addr is not null, so it is checked in this contract.
 
Methods inherited from class net.sourceforge.c4j.ContractBase
addLogger, classInvariantCheck, getPreconditionValue, getReturnValue, getTargetField, popPreconditionValuesMap, popReturnValue, postConditionCheck, preConditionCheck, pushPreconditionValuesMap, pushReturnValue, setPreconditionValue, setReturnValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

server

SMTPServer server
The server class being checked

Constructor Detail

SMTPServerContract

public SMTPServerContract(SMTPServer server)
Creates a new SMTPServerContract for the passed server object (this is handled automatically) by the library

Parameters:
server - The server to have its contracts tested
Method Detail

classInvariant

public void classInvariant()
Specifies the states of the server that should never change. These fields are used throughout the server without null checking.


pre_processExpn

public void pre_processExpn(java.lang.String args)
Code doesn't check to ensure that args is not null, so it is checked in this contract.

Parameters:
args - Should not be null.

pre_processHelo

public void pre_processHelo(java.lang.String args)
Code doesn't check to ensure that args is not null, so it is checked in this contract.

Parameters:
args - Should not be null.

pre_getAddress

public void pre_getAddress(java.lang.String address)
Code doesn't check to ensure that address is not null, so it is checked in this contract.

Parameters:
address - Should not be null.

pre_checkAddress

public void pre_checkAddress(java.lang.String addr)
Code doesn't check to ensure that addr is not null, so it is checked in this contract.

Parameters:
addr - Should not be null.

pre_processEhlo

public void pre_processEhlo(java.lang.String args)
Code doesn't check to ensure that args is not null, so it is checked in this contract.

Parameters:
args - Should not be null.

pre_processRcpt

public void pre_processRcpt(java.util.List<java.lang.String> relays,
                            java.lang.String addr)
¥ÊCode doesn't check to ensure that addr is not null, so it is checked in this contract.

Parameters:
relays - Don't care about this, it is never used in the method.
addr - Should not be null.

post_processRcpt

public void post_processRcpt(java.util.List<java.lang.String> relays,
                             java.lang.String addr)
Check to ensure that the server always returns a response (if there is a problem, it should return an error string, never null).

Parameters:
relays -
addr -

post_getUsers

public void post_getUsers()
Check to ensure that the server always returns a response (if there is a problem, it should return an error string, never null).


post_getDomains

public void post_getDomains()
Check to ensure that the server always returns a response (if there is a problem, it should return an error string, never null).


post_checkAddress

public void post_checkAddress(java.lang.String addr)
Check to ensure that the server always returns a response (if there is a problem, it should return an error string, never null).

Parameters:
addr -

post_processData

public void post_processData()
Check to ensure that the server always returns a response (if there is a problem, it should return an error string, never null).


post_processExpn

public void post_processExpn(java.lang.String args)
Check to ensure that the server always returns a response (if there is a problem, it should return an error string, never null).

Parameters:
args -

post_processHelo

public void post_processHelo(java.lang.String args)
Check to ensure that the server always returns a response (if there is a problem, it should return an error string, never null).

Parameters:
args -

post_processHelp

public void post_processHelp(java.lang.String args)
Check to ensure that the server always returns a response (if there is a problem, it should return an error string, never null).

Parameters:
args -

post_processMail

public void post_processMail(java.lang.String args)
Check to ensure that the server always returns a response (if there is a problem, it should return an error string, never null).

Parameters:
args -

post_processMessageFinished

public void post_processMessageFinished()
Check to ensure that the server always returns a response (if there is a problem, it should return an error string, never null).


post_processNoop

public void post_processNoop()
Check to ensure that the server always returns a response (if there is a problem, it should return an error string, never null).


post_processQuit

public void post_processQuit()
Check to ensure that the server always returns a response (if there is a problem, it should return an error string, never null).


jSyncManager Simple Java Server

Copyright (c) 2004 Brad BARCLAY. All Rights Reserved.