class NetStorageSender extends HttpSenderBase {

	@Override
	public void configure() throws ConfigurationException {
		//The HttpSenderBase dictates that you must use a Parameter with 'getUrlParam()' as name to use a dynamic endpoint.
		//In order to not force everyone to use the URL parameter but instead the input of the sender as 'dynamic' path, this exists.
		Parameter urlParameter = new Parameter();
		urlParameter.setName(getUrlParam());
		urlParameter.setSessionKey(URL_PARAM_KEY);
		addParameter(urlParameter);

		super.configure();

		//Safety checks
		if(getAction() == null)
			throw new ConfigurationException(getLogPrefix()+"action must be specified");
		if(!actions.contains(getAction()))
			throw new ConfigurationException(getLogPrefix()+"unknown or invalid action ["+getAction()+"] supported actions are "+actions.toString()+"");

		if(getCpCode() == null)
			throw new ConfigurationException(getLogPrefix()+"cpCode must be specified");
		if(!getUrl().startsWith("http"))
			throw new ConfigurationException(getLogPrefix()+"url must be start with http(s)");

		if(hashAlgorithm != null && !hashAlgorithms.contains(hashAlgorithm))
			throw new ConfigurationException(getLogPrefix()+"unknown authenticationMethod ["+hashAlgorithm+"] supported methods are "+hashAlgorithms.toString()+"");

		if(getSignVersion() < 3 || getSignVersion() > 5)
			throw new ConfigurationException(getLogPrefix()+"signVersion must be either 3, 4 or 5");


		ParameterList parameterList = getParameterList();
		if(getAction().equals("upload") && parameterList.findParameter("file") == null)
			throw new ConfigurationException(getLogPrefix()+"the upload action requires a file parameter to be present");
		if(getAction().equals("rename") && parameterList.findParameter("destination") == null)
			throw new ConfigurationException(getLogPrefix()+"the rename action requires a destination parameter to be present");
		if(getAction().equals("mtime") && parameterList.findParameter("mtime") == null)
			throw new ConfigurationException(getLogPrefix()+"the mtime action requires a mtime parameter to be present");

		accessTokenCf = new CredentialFactory(getAuthAlias(), getNonce(), getAccessToken());
	}

}