Interfaces

Prev Next

This section includes the available interfaces and examples.

Properties

Name

Description

MappIntelligence.VERSION

Mapp Intelligence version.

MappIntelligence.V4

Identifier for pixel v4.

MappIntelligence.V5

Identifier for pixel v5.

MappIntelligence.SMART

Identifier for smart pixel.

MappIntelligence.CLIENT_SIDE_COOKIE

Identifier for 1st party cookies.

MappIntelligence.SERVER_SIDE_COOKIE

Identifier for 3rd party cookies.

Methods

setDomain

/**
 * @param domain Specifies the domain within which this cookie should be presented.
 */
void setDomain(String domain);

getDomain

/**
 * @return Gets the domain name of this cookie.
 */
String getDomain();

setMaxAge

/**
 * Sets the maximum age in seconds for this cookie.
 *
 * @param expiry Sets the maximum age in seconds for this cookie.
 */
void setMaxAge(int expiry);

getMaxAge

/**
 * Gets the maximum age in seconds of this cookie.
 *
 * @return Gets the maximum age in seconds of this cookie.
 */
int getMaxAge();

setPath

/**
 * @param uri Specifies a path for the cookie to which the client should return the cookie.
 */
void setPath(String uri);

getPath

/**
 * @return Returns the path on the server to which the browser returns this cookie.
 */
String getPath();

setSecure

/**
 * @param flag Indicates to the browser whether the cookie should only be sent using a secure protocol, such as
 *             HTTPS or SSL.
 */
void setSecure(boolean flag);

isSecure

/**
 * @return  Returns true if the browser is sending cookies only over a secure protocol, or false if the browser
 *          can send cookies using any protocol.
 */
boolean isSecure();

getName

/**
 * @return Returns the name of the cookie.
 */
String getName();

getValue

/**
 * @return Gets the current value of this cookie.
 */
String getValue();

setHttpOnly

/**
 * @param isHttpOnly Marks or unmarks this cookie as HttpOnly.
 */
void setHttpOnly(boolean isHttpOnly);

isHttpOnly

/**
 * @return Checks whether this cookie has been marked as HttpOnly.
 */
boolean isHttpOnly();

Create your own LoggerClass to debug our Mapp Intelligence Java library.

Methods

log

/**
 * @param msg Debug message
 */
void log(String msg);
/**
 * @param format String format
 * @param args Arguments
 */
void log(String format, Object... args);

Example

class CustomLogger implements MappIntelligenceLogger {
	/**
	 * @param msg Debug message
	 */
	@Override
	public void log(String msg) {
		System.out.println(msg);
	}

	/**
	 * @param format String format
	 * @param args   Arguments
	 */
	@Override
	public void log(String format, Object... args) {
		System.out.println(String.format(format, args));
	}
}

Create your own ConsumerClass to use for data transfer to Intelligence.

Methods

sendBatch

/**
 * @param batchContent List of tracking requests
 *
 * @return boolean
 */
boolean sendBatch(List<String> batchContent);

Example

class TestCustomPrintConsumer implements MappIntelligenceConsumer {
	/**
	 * @param batchContent List of tracking requests
	 *
	 * @return boolean
	 */
	public boolean sendBatch(List<String> batchContent) {
		for (String request : batchContent) {
			System.out.println(request);
		}

		return true;
	}
}