Class GatewayConnector
- java.lang.Object
-
- org.apache.ofbiz.accounting.thirdparty.eway.GatewayConnector
-
public class GatewayConnector extends java.lang.Object
Handles connections to the eWay servers. Based on public domain sample code provided by eWay.com.au
-
-
Constructor Summary
Constructors Constructor Description GatewayConnector()
GatewayConnector(int timeout)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getTimeout()
Get the timeout value set in the corresponding setter.GatewayResponse
sendRequest(GatewayRequest request)
Send a request to the payment gateway and get the response.void
setTimeout(int time)
Set the timout value.
-
-
-
Method Detail
-
getTimeout
public int getTimeout()
Get the timeout value set in the corresponding setter.- Returns:
- timeout value in seconds, 0 for infinite
-
setTimeout
public void setTimeout(int time)
Set the timout value. Note that setting the timeout for an HttpURLConnection is possible only since Java 1.5. This method has no effect on earlier versions.- Parameters:
time
- timeout value in seconds, 0 for infinite
-
sendRequest
public GatewayResponse sendRequest(GatewayRequest request) throws java.lang.Exception
Send a request to the payment gateway and get the response. This is a blocking method: when it returns the response object is filled in with the parameters from the gateway.- Parameters:
request
- the request object, can be any of the 3 supported payment methods. Its data have to be filled in by its setter methods before calling sendRequest().- Returns:
- the response object, containing the gateway's response to the request
- Throws:
java.lang.Exception
- in case of networking and xml parsing errors
-
-