Skip to main content

idmap.addIdmap

idmap.addIdmap(ep1, id1, ep2, id2)

Description

Creates an id mapping association between endpoint ep1, id id1 and endpoint ep2, id id2.

Parameters

ParameterTypeExplanation
ep1StringThe first endpoint
id1StringThe first id (the id in the idmaps of the endpoint ep1)
ep2StringThe second endpoint
id2StringThe second id (the id in the idmaps of the endpoint ep2)

Example

idmap = option.getIdmap()

originid = message.getId()
originendpoint = message.getEndpoint()
id = idmap.findIdmap(originendpoint, originid, api.getEndpoint())
if(id == null)
idmap.addIdmap(originendpoint, originid, api.getEndpoint(), "fresh-"+originid)