|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.api.ads.common.lib.soap.SoapClientHandler<T>
T - the SOAP client typepublic abstract class SoapClientHandler<T>
Base class for SOAP client handlers. Calling invoke(SoapCall) will
perform the method retrieved from SoapCall.getSoapClientMethod() on
the SoapCall.getSoapClient() with the arguments retrieved from
SoapCall.getSoapArgs().
SoapClientHandlerInterface| Constructor Summary | |
|---|---|
protected |
SoapClientHandler()
Default constructor. |
| Method Summary | |
|---|---|
Method |
getSoapClientMethod(T soapClient,
Method method)
Gets the method from the SOAP client that matches the supplied method. |
protected Object |
invoke(SoapCall<T> soapCall)
Takes a SoapCall object and invokes the method by reflection. |
protected Object[] |
processSoapArguments(Method soapClientMethod,
Object[] args)
Processes the arguments such that they will be ready to be passed into the supplied SOAP client method. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.google.api.ads.common.lib.soap.SoapClientHandlerInterface |
|---|
clearHeaders, createSoapClient, createSoapHeaderElement, getEndpointAddress, getHeader, invokeSoapCall, setCompression, setEndpointAddress, setHeader, setHttpHeaders |
| Constructor Detail |
|---|
protected SoapClientHandler()
| Method Detail |
|---|
protected Object[] processSoapArguments(Method soapClientMethod,
Object[] args)
In the default implementation of processing arguments, if the number of
arguments is too small, the argument list will be padded with null.
If args is null, null will be returned.
soapClientMethod - the SOAP client method that will be called with the
argsargs - the arguments that will be processed
soapClientMethod.
public Method getSoapClientMethod(T soapClient,
Method method)
throws NoSuchMethodException
In the default implementation, only the method name and return type will be matched.
getSoapClientMethod in interface SoapClientHandlerInterface<T>soapClient - the SOAP client within which to search for the methodmethod - the method to match
NoSuchMethodException - thrown if the SOAP client does not contain
the requested method.
TODO(api.arogal): Needs to check parameter types as well as name/return.
protected Object invoke(SoapCall<T> soapCall)
throws Exception
SoapCall object and invokes the method by reflection.
soapCall - contains the SOAP method, SOAP client, and args to be
called
Exception - thrown if calling the operation on the remote service
fails
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||