com.jgoodies.validation.tutorial.performance
Class BackendService

java.lang.Object
  extended by com.jgoodies.validation.tutorial.performance.BackendService

public final class BackendService
extends Object

Provides a validation service that simulates a slow back-end operation. A server-side service may be slow due to database requests, heavy computations, slow network transport, etc. The JGoodies Validation tutorial demonstrates approaches to handle this situation: delayed validation, background validation, client-side pre-validation, client-side caching.

The above techniques apply if the costs to check for valid data are significantly lower than the costs to look up valid choices, or if you cannot look up or compute the valid choices. If the valid choices can be provided at affordable costs, a client may choose to present the valid choices, instead of complaining about invalid data.

Version:
$Revision: 1.7 $
Author:
Karsten Lentzsch

Method Summary
static boolean isValidContainerNumber(String containerNumber)
          Checks and answers if the given container number is valid.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isValidContainerNumber

public static boolean isValidContainerNumber(String containerNumber)
Checks and answers if the given container number is valid. Since all valid container numbers consist of 5 digits, a client-side validator may check the length and characters before asking this service.

Parameters:
containerNumber - the container number to be checked
Returns:
true if the given number is valid


Copyright © 2003-2008 JGoodies Karsten Lentzsch. All Rights Reserved.