public class ForwarderInformationGrabber
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private IImageEncodedCaptcha |
m_captcha
This stores the captcha, if we have successfully parsed the forwarder information.
|
private int |
m_errorCode
This stores the error (if any) which occured, while the information was fetched or parsed.
|
static int |
RETURN_INFOSERVICE_ERROR
This is the error code indicating that there was an error while fetching the data directly
from the infoservice.
|
static int |
RETURN_NO_CAPTCHA_IMPLEMENTATION
This error occurs, if we don't know the captcha format which is used by the fetched
forwarder information structure.
|
static int |
RETURN_SUCCESS
This is the error code indicating that everything was fine.
|
static int |
RETURN_UNKNOWN_ERROR
This error code indicates, that there was an unexpected error, maybe the data fetched are
in the wrong format.
|
Constructor and Description |
---|
ForwarderInformationGrabber()
Creates a new ForwarderInformationGrabber and tries to fetch the information about a
forwarder from the infoservices.
|
ForwarderInformationGrabber(java.lang.String a_xmlData)
Creates a new ForwarderInformationGrabber instance and parses the supplied information
structure.
|
Modifier and Type | Method and Description |
---|---|
private int |
findCaptchaImplementation(org.w3c.dom.Element a_captchaEncodedNode)
Finds the correct captcha implementation for the supplied captcha.
|
IImageEncodedCaptcha |
getCaptcha()
Returns the structure which includes the captcha with the forwarder information.
|
int |
getErrorCode()
Returns the error code which may occured while creating this instance of
ForwarderInformationGrabber.
|
public static final int RETURN_SUCCESS
public static final int RETURN_INFOSERVICE_ERROR
public static final int RETURN_UNKNOWN_ERROR
public static final int RETURN_NO_CAPTCHA_IMPLEMENTATION
private int m_errorCode
private IImageEncodedCaptcha m_captcha
public ForwarderInformationGrabber()
public ForwarderInformationGrabber(java.lang.String a_xmlData)
a_xmlData
- The XML structure with the JapForwarder node, like it is distribute from
the infoservices with the getforwarder command.public int getErrorCode()
public IImageEncodedCaptcha getCaptcha()
private int findCaptchaImplementation(org.w3c.dom.Element a_captchaEncodedNode)
a_captchaEncodedNode
- The CaptchaEncodedNode which holds all needed information.Copyright © 2023. All rights reserved.