com.nevelex.app.args
Interface ArgumentConsumer


public interface ArgumentConsumer

Interface defining specific methods called on the argument consumer before and after the ArgumentProcessor's processing of arguments.

Usually, the argument consumer would be the application's main class or configuration class.

Version:
1.0 03/22/2001: Initial Version.,
1.1 04/29/2003: Updated documenation.
Author:
Michel Dalal

Method Summary
 void checkArgumentState()
          The method is called by the ArgumentProcessor after all the arguments have been processed by the application.
 void initArgumentState()
          The method is called by the ArgumentProcessor before any the arguments have been processed by the application.
 

Method Detail

initArgumentState

public void initArgumentState()
                       throws java.lang.IllegalStateException
The method is called by the ArgumentProcessor before any the arguments have been processed by the application. It checks the state of the consumer. If the consumer is not in a valid state, a MissingArgumentException will be thrown.

Throws:
java.lang.IllegalStateException - thrown if the application is not in the desired state.

checkArgumentState

public void checkArgumentState()
                        throws MissingArgumentException
The method is called by the ArgumentProcessor after all the arguments have been processed by the application. It checks the state of the consumer. If the consumer is not in a valid state, a MissingArgumentException will be thrown.

Throws:
MissingArgumentException - thrown if the argument list did not contain all the required arguments.