MemoryTranscriptStore Class

  • java.lang.Object
    • com.microsoft.bot.builder.MemoryTranscriptStore

Implements

public class MemoryTranscriptStore
implements TranscriptStore

The memory transcript store stores transcripts in volatile memory in a Dictionary.

Because this uses an unbounded volatile dictionary this should only be used for unit tests or non-production environments.

Constructor Summary

Constructor Description
MemoryTranscriptStore()

Method Summary

Modifier and Type Method and Description
java.util.concurrent.CompletableFuture<java.lang.Void> deleteTranscript(String channelId, String conversationId)

Deletes conversation data from the store.

java.util.concurrent.CompletableFuture<PagedResult<Activity>> getTranscriptActivities(String channelId, String conversationId, String continuationToken, OffsetDateTime startDate)

Gets from the store activities that match a set of criteria.

java.util.concurrent.CompletableFuture<PagedResult<TranscriptInfo>> listTranscripts(String channelId, String continuationToken)

Gets the conversations on a channel from the store.

final java.util.concurrent.CompletableFuture<java.lang.Void> logActivity(Activity activity)

Logs an activity to the transcript.

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Constructor Details

MemoryTranscriptStore

public MemoryTranscriptStore()

Method Details

deleteTranscript

public CompletableFuture deleteTranscript(String channelId, String conversationId)

Deletes conversation data from the store.

Parameters:

channelId - The ID of the channel the conversation is in.
conversationId - The ID of the conversation to delete.

Returns:

A task that represents the work queued to execute.

getTranscriptActivities

public CompletableFuture> getTranscriptActivities(String channelId, String conversationId, String continuationToken, OffsetDateTime startDate)

Gets from the store activities that match a set of criteria.

Parameters:

channelId - The ID of the channel the conversation is in.
conversationId - The ID of the conversation.
continuationToken - The continuation token from the previous page of results.
startDate - A cutoff date. Activities older than this date are not included.

Returns:

A task that represents the work queued to execute. If the task completes successfully, the result contains the matching activities.

listTranscripts

public CompletableFuture> listTranscripts(String channelId, String continuationToken)

Gets the conversations on a channel from the store.

Parameters:

channelId - The ID of the channel.
continuationToken - The continuation token from the previous page of results.

Returns:

A task that represents the work queued to execute.

logActivity

public final CompletableFuture logActivity(Activity activity)

Logs an activity to the transcript.

Parameters:

activity - The activity to log.

Returns:

A CompletableFuture that represents the work queued to execute.

Applies to