View Javadoc
1   package au.gov.amsa.ais;
2   
3   import au.gov.amsa.ais.message.AisPositionA;
4   
5   /**
6    * This factory creates {@link AisExtractor} instances. It is in use so that we
7    * can mock AisExtractors used by the message parsers (for example
8    * {@link AisPositionA}.
9    * 
10   * @author dxm
11   * 
12   */
13  public interface AisExtractorFactory {
14  
15  	/**
16  	 * Returns an extractor for the given message. If the decoded message does
17  	 * not have the specified minimum length then an AisParseException is
18  	 * thrown.
19  	 * 
20  	 * @param message
21  	 * @param minLength
22  	 * @param padBits
23  	 * @return
24  	 */
25  	AisExtractor create(String message, int minLength, int padBits);
26  }