Edge Network API reference

extensionVersion

Returns the version of the client-side Edge extension.
Android
iOS

Java

Syntax

1
public static String extensionVersion();
Copied!

Example

1
Edge.extensionVersion();
Copied!

Swift

Syntax

1
public static let extensionVersion
Copied!

Example

1
Edge.extensionVersion
Copied!

Objective-C

Syntax

1
// Swift Edge
2
public static let extensionVersion
Copied!

Example

1
[AEPMobileEdge extensionVersion];
Copied!

sendEvent

Sends an Experience event to Adobe Experience Edge Network.
Android
iOS

Java

Syntax

1
public static void sendEvent(final ExperienceEvent experienceEvent, final EdgeCallback callback);
Copied!
  • experienceEvent - the XDM Experience Event to be sent to Adobe Experience Edge Network
  • callback - optional callback to be invoked when the request is complete, returning the associated response handles received from the Adobe Experience Edge Network. It may be invoked on a different thread.

Example

1
// example 1 - send the experience event without handling the Edge Network response
2
Edge.sendEvent(experienceEvent, null);
3
4
// example 2 - send the experience event and handle the Edge Network response onComplete
5
Edge.sendEvent(experienceEvent, new EdgeCallback() {
6
@Override
7
public void onComplete(final List<EdgeEventHandle> handles) {
8
// handle the Edge Network response
9
}
10
});
Copied!

Swift

Syntax

1
static func sendEvent(experienceEvent: ExperienceEvent, _ completion: (([EdgeEventHandle]) -> Void)? = nil)
Copied!
  • experienceEvent - the XDM Experience Event to be sent to Adobe Experience Edge Network
  • completion - optional completion handler to be invoked when the request is complete, returning the associated response handles received from the Adobe Experience Edge Network. It may be invoked on a different thread.

Example

1
// example 1 - send the experience event without handling the Edge Network response
2
Edge.sendEvent(experienceEvent: experienceEvent)
3
4
// example 2 - send the experience event and handle the Edge Network response onComplete
5
Edge.sendEvent(experienceEvent: experienceEvent) { (handles: [EdgeEventHandle]) in
6
// handle the Edge Network response
7
}
Copied!

Objective-C

Syntax

1
// Swift Edge
2
static func sendEvent(experienceEvent: ExperienceEvent, _ completion: (([EdgeEventHandle]) -> Void)? = nil)
Copied!

Example

1
// example 1 - send the experience event without handling the Edge Network response
2
[AEPMobileEdge sendExperienceEvent:event completion:nil];
3
4
// example 2 - send the experience event and handle the Edge Network response onComplete
5
[AEPMobileEdge sendExperienceEvent:event completion:^(NSArray<AEPEdgeEventHandle *> * _Nonnull handles) {
6
// handle the Edge Network response
7
}];
Copied!

registerExtension

Registers the Edge extension with the Mobile Core SDK.
Android
iOS

Java

Syntax

1
public static void registerExtension();
Copied!

Example

1
Edge.registerExtension();
Copied!

Swift

Use the MobileCore API to register the Edge extension.

Syntax

1
// MobileCore
2
public static func registerExtensions(_ extensions: [Extension.Type], _ completion: (() -> Void)? = nil)
Copied!

Example

1
MobileCore.registerExtensions([Edge.self, ...], {
2
// processing after registration
3
})
Copied!

Objective-C

Use the AEPMobileCore API to register the Edge extension.

Syntax

1
// Swift MobileCore
2
public static func registerExtensions(_ extensions: [Extension.Type], _ completion: (() -> Void)? = nil)
Copied!

Example

1
[AEPMobileCore registerExtensions:@[AEPMobileEdge.class, ...] completion:^{
2
// processing after registration
3
}];
Copied!

Public classes

Android

Java

Schema and Property interfaces

The Edge extension provides the following interfaces:
  • Schema
  • Property
By using the Edge extension, the Schema interface can be used to define the classes that are associated with your defined schema in Adobe Experience Platform.
1
/**
2
* The interface that represents an Experience XDM event data schema.
3
*/
4
public interface Schema {
5
6
/**
7
* Returns the version of this schema as defined in the Adobe Experience Platform.
8
* @return the version of this schema.
9
*/
10
String getSchemaVersion();
11
12
/**
13
* Returns the identifier for this schema as defined in the Adobe Experience Platform.
14
* The identifier is a URI where this schema is defined.
15
* @return the URI identifier for this schema.
16
*/
17
String getSchemaIdentifier();
18
19
/**
20
* Returns the identifier for this dataset as defined in the Adobe Experience Platform.
21
* @return the dataset ID
22
*/
23
String getDatasetIdentifier();
24
25
/**
26
* Serialize this {@code Schema} object to a map with the same format as its XDM schema.
27
* @return the XDM-formatted map of this {@code Schema} object.
28
*/
29
Map<String, Object> serializeToXdm();
30
}
Copied!
By implementing the Property interface, you can define complex properties for your XDM Schema. A complex property is defined as not being a primitive type, String, or Date.
1
public interface Property {
2
3
/**
4
* Serialize this {@code Property} object to a map with the same format as its XDM schema.
5
* @return XDM-formatted map of this {@code Property} object.
6
*/
7
Map<String, Object> serializeToXdm();
8
}
Copied!
When defining your custom XDM Schema(s), implement these interfaces to ensure that the AEP Edge extension successfully serializes the provided data before sending it to Adobe Experience Edge Network.

EdgeEventHandle

1
/**
2
* The {@link EdgeEventHandle} is a response fragment from Adobe Experience Edge Service for a sent XDM Experience Event.
3
* One event can receive none, one or multiple {@link EdgeEventHandle}(s) as response.
4
*/
5
public class EdgeEventHandle {
6
/**
7
* @return the payload type or null if not found in the {@link JSONObject} response
8
*/
9
public String getType() {...}
10
11
/**
12
* @return the event payload values for this {@link EdgeEventHandle} or null if not found in the {@link JSONObject} response
13
*/
14
public List<Map<String, Object>> getPayload() {...}
15
}
Copied!
Use this class when calling the sendEvent API with EdgeCallback.
Last modified 3mo ago