public class Message implements Interaction
Message in a Message Pact
@NotNull public static java.lang.String JSON
public static au.com.dius.pact.core.model.messaging.Message.Companion Companion
@JvmOverloads
public Message(@NotNull
java.lang.String description,
@NotNull
java.util.List<au.com.dius.pact.core.model.ProviderState> providerStates,
@NotNull
OptionalBody contents,
@NotNull
MatchingRules matchingRules,
@NotNull
Generators generators,
@NotNull
java.util.Map<java.lang.String,? extends java.lang.Object> metaData,
@Nullable
java.lang.String interactionId)
Message in a Message Pact
description - Interaction descriptionproviderStates - Returns the provider states for this interactioninteractionId - Interaction ID. Will only be populated from pacts loaded from a Pact Broker@JvmOverloads
public Message(@NotNull
java.lang.String description,
@NotNull
java.util.List<au.com.dius.pact.core.model.ProviderState> providerStates,
@NotNull
OptionalBody contents,
@NotNull
MatchingRules matchingRules,
@NotNull
Generators generators,
@NotNull
java.util.Map<java.lang.String,? extends java.lang.Object> metaData)
Message in a Message Pact
description - Interaction descriptionproviderStates - Returns the provider states for this interaction@JvmOverloads
public Message(@NotNull
java.lang.String description,
@NotNull
java.util.List<au.com.dius.pact.core.model.ProviderState> providerStates,
@NotNull
OptionalBody contents,
@NotNull
MatchingRules matchingRules,
@NotNull
Generators generators)
Message in a Message Pact
description - Interaction descriptionproviderStates - Returns the provider states for this interaction@JvmOverloads
public Message(@NotNull
java.lang.String description,
@NotNull
java.util.List<au.com.dius.pact.core.model.ProviderState> providerStates,
@NotNull
OptionalBody contents,
@NotNull
MatchingRules matchingRules)
Message in a Message Pact
description - Interaction descriptionproviderStates - Returns the provider states for this interaction@JvmOverloads
public Message(@NotNull
java.lang.String description,
@NotNull
java.util.List<au.com.dius.pact.core.model.ProviderState> providerStates,
@NotNull
OptionalBody contents)
Message in a Message Pact
description - Interaction descriptionproviderStates - Returns the provider states for this interaction@JvmOverloads
public Message(@NotNull
java.lang.String description,
@NotNull
java.util.List<au.com.dius.pact.core.model.ProviderState> providerStates)
Message in a Message Pact
description - Interaction descriptionproviderStates - Returns the provider states for this interaction@JvmOverloads
public Message(@NotNull
java.lang.String description)
Message in a Message Pact
description - Interaction description@NotNull public kotlin.Array[] contentsAsBytes()
@NotNull public java.lang.String contentsAsString()
@NotNull public java.lang.String getContentType()
@Deprecated @Nullable public org.apache.http.entity.ContentType getParsedContentType()
@NotNull
public java.util.Map<java.lang.String,java.lang.Object> toMap(@NotNull
PactSpecVersion pactSpecVersion)
Converts this interaction to a Map
@NotNull public java.lang.String formatContents()
@NotNull public java.lang.String uniqueKey()
Generates a unique key for this interaction
public boolean conflictsWith(@NotNull
Interaction other)
Checks if this interaction conflicts with the other one. Used for merging pact files.
public boolean equals(@Nullable
java.lang.Object other)
public int hashCode()
@NotNull public java.lang.String toString()
@NotNull public Message withMetaData(@NotNull java.util.Map<java.lang.String,? extends java.lang.Object> metadata)
@NotNull public java.lang.String getDescription()
Interaction description
@NotNull public java.util.List<au.com.dius.pact.core.model.ProviderState> getProviderStates()
Returns the provider states for this interaction
@NotNull public OptionalBody getContents()
public void setContents(@NotNull
OptionalBody p)
@NotNull public MatchingRules getMatchingRules()
public void setMatchingRules(@NotNull
MatchingRules p)
@NotNull public Generators getGenerators()
public void setGenerators(@NotNull
Generators p)
@NotNull public java.util.Map<java.lang.String,java.lang.Object> getMetaData()
public void setMetaData(@NotNull
java.util.Map<java.lang.String,? extends java.lang.Object> p)
@Nullable public java.lang.String getInteractionId()
Interaction ID.
Will only be populated from pacts loaded from a Pact Broker
@JvmStatic @NotNull public static Message fromJson(@NotNull com.google.gson.JsonObject json)
Builds a message from a Map