com.google.api.ads.dfa.lib.client
Class DfaServiceDescriptor

java.lang.Object
  extended by com.google.api.ads.dfa.lib.client.DfaServiceDescriptor
All Implemented Interfaces:
AdsServiceDescriptor, AxisCompatible, SoapServiceDescriptor

public class DfaServiceDescriptor
extends Object
implements AdsServiceDescriptor, AxisCompatible

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

Author:
Joseph DiLallo

Constructor Summary
DfaServiceDescriptor(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()
          Generates the locator class for this service by using reflection.
protected  String getServiceName()
          Generates the name of this service by using reflection.
 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

DfaServiceDescriptor

@Inject
public DfaServiceDescriptor(Class<?> interfaceClass,
                                   String version)
Constructor. Requires the necessary information to instantiate a DFA service.

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

getInterfaceClass

public Class<?> getInterfaceClass()
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
See Also:
AdsServiceDescriptor.getInterfaceClass()

getLocatorClass

public Class<?> getLocatorClass()
                         throws ClassNotFoundException
Generates the locator class for this service by using reflection.

Specified by:
getLocatorClass in interface AxisCompatible
Returns:
the Class<? extends Service> representing the locator
Throws:
ClassNotFoundException - if the formulated locator class name name could not be found

getServiceName

protected String getServiceName()
Generates the name of this service by using reflection.

Returns:
the name of the service this descriptor represents

getEndpointAddress

public String getEndpointAddress(String endpointServer)
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.
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()


Copyright © 2012. All Rights Reserved.