com.google.api.ads.dfp.lib.client
Class DfpServiceDescriptor

java.lang.Object
  extended by com.google.api.ads.dfp.lib.client.DfpServiceDescriptor
All Implemented Interfaces:
AdsServiceDescriptor, Axis2Compatible, AxisCompatible, JaxWsCompatible, SoapServiceDescriptor

public class DfpServiceDescriptor
extends Object
implements AdsServiceDescriptor, AxisCompatible, Axis2Compatible, JaxWsCompatible

DfpServiceDescriptor provides a class which defines a service that can be instantiated through reflection.

Author:
Adam Rogal, Jeff Sham

Constructor Summary
DfpServiceDescriptor(Class<?> interfaceClass, String version)
          Constructor.
 
Method Summary
 String getEndpointAddress(String endpointServer)
          Gets the endpoint address for this service and server.
 Class<?> getInterfaceClass()
          Gets the class representing the RPC interface of the service.
 Class<?> getLocatorClass()
          Gets the Axis locator class such that it can be instantiated to create an Axis service client.
 Class<?> getServiceClass()
          Gets the JAX-WS service class such that it can be instantiated to create an JAX-WS service client.
 Class<?> getStubClass()
          Gets the Axis2 stub class such that it can be instantiated to create an Axis2 service client.
 String getVersion()
          Gets the version for this service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DfpServiceDescriptor

@Inject
public DfpServiceDescriptor(Class<?> interfaceClass,
                                   String version)
Constructor. Requires the necessary information to instantiate an Dfp service.

Parameters:
interfaceClass - the Class<?> object of the requested interfaceClass
version - the version of the service
Method Detail

getInterfaceClass

public Class<?> getInterfaceClass()
                           throws ServiceException
Description copied from interface: AdsServiceDescriptor
Gets the class representing the RPC interface of the service.

Specified by:
getInterfaceClass in interface AdsServiceDescriptor
Specified by:
getInterfaceClass in interface SoapServiceDescriptor
Throws:
ServiceException - if the interface could not be retrieved.
See Also:
AdsServiceDescriptor.getInterfaceClass()

getEndpointAddress

public String getEndpointAddress(String endpointServer)
                          throws MalformedURLException
Description copied from interface: AdsServiceDescriptor
Gets the endpoint address for this service and server.

Specified by:
getEndpointAddress in interface AdsServiceDescriptor
Specified by:
getEndpointAddress in interface SoapServiceDescriptor
Returns:
the endpoint address for this service and server.
Throws:
MalformedURLException
See Also:
AdsServiceDescriptor.getEndpointAddress(String)

getVersion

public String getVersion()
Description copied from interface: AdsServiceDescriptor
Gets the version for this service.

Specified by:
getVersion in interface AdsServiceDescriptor
Returns:
the version for this service
See Also:
AdsServiceDescriptor.getVersion()

getStubClass

public Class<?> getStubClass()
                      throws ClassNotFoundException
Description copied from interface: Axis2Compatible
Gets the Axis2 stub class such that it can be instantiated to create an Axis2 service client.

Specified by:
getStubClass in interface Axis2Compatible
Returns:
the Axis2 stub class
Throws:
ClassNotFoundException - if no stub class can be found
See Also:
Axis2Compatible.getStubClass()

getLocatorClass

public Class<?> getLocatorClass()
                         throws ClassNotFoundException
Description copied from interface: AxisCompatible
Gets the Axis locator class such that it can be instantiated to create an Axis service client.

Specified by:
getLocatorClass in interface AxisCompatible
Returns:
the Axis locator class
Throws:
ClassNotFoundException - if no locator class can be found
See Also:
AxisCompatible.getLocatorClass()

getServiceClass

public Class<?> getServiceClass()
                         throws ClassNotFoundException
Description copied from interface: JaxWsCompatible
Gets the JAX-WS service class such that it can be instantiated to create an JAX-WS service client.

Specified by:
getServiceClass in interface JaxWsCompatible
Returns:
the JAX-WS service class
Throws:
ClassNotFoundException - if no service class can be found
See Also:
JaxWsCompatible.getServiceClass()


Copyright © 2012. All Rights Reserved.