com.google.ads.mediation
Class MediationServerParameters

java.lang.Object
  extended by com.google.ads.mediation.MediationServerParameters
Direct Known Subclasses:
AdMobAdapterServerParameters, CustomEventServerParameters

public abstract class MediationServerParameters
extends Object

Settings set by the publisher on the mediation back-end servers. These should be settings that a user would want to set across all ad requests, such as slotId.

The adapter author is required to subclass this class for his adapter's server side parameters. This gives them two methods of defining parameters: They can either override the load(Map) method, or they may define String fields with @Parameter annotations. This takes the form:

 @Parameter("application_id", required = true)
 public String applicationId;
 
The required parameter to the annotation is optional and defaults to true. If any required fields are missing, the adapter will not be invoked.


Nested Class Summary
static class MediationServerParameters.MappingException
          Exception thrown when there is an issue mapping fields, usually due to required fields missing or type mismatches.
 
Constructor Summary
MediationServerParameters()
           
 
Method Summary
 void load(Map<String,String> parameters)
          Maps a Map<String, String> to fields in the derived class.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MediationServerParameters

public MediationServerParameters()
Method Detail

load

public void load(Map<String,String> parameters)
          throws MediationServerParameters.MappingException
Maps a Map<String, String> to fields in the derived class. This method may be overridden to perform more complicated, custom mappings.

Throws:
MediationServerParameters.MappingException - any required fields are missing