EventFactory Class

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

public final class EventFactory

Contains utility methods for creating various event types.

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

Method Details

createHandoffInitiation

public static Activity createHandoffInitiation(TurnContext turnContext, Object handoffContext)

Create handoff initiation event.

Parameters:

turnContext - turn context.
handoffContext - agent hub-specific context.

Returns:

handoff event.

createHandoffInitiation

public static Activity createHandoffInitiation(TurnContext turnContext, Object handoffContext, Transcript transcript)

Create handoff initiation event.

Parameters:

turnContext - turn context.
handoffContext - agent hub-specific context.
transcript - transcript of the conversation.

Returns:

handoff event.

createHandoffStatus

public static Activity createHandoffStatus(ConversationAccount conversation, String state)

Create handoff status event.

Parameters:

conversation - Conversation being handed over.
state - State, possible values are: "accepted", "failed", "completed".

Returns:

handoff event.

createHandoffStatus

public static Activity createHandoffStatus(ConversationAccount conversation, String state, String message)

Create handoff status event.

Parameters:

conversation - Conversation being handed over.
state - State, possible values are: "accepted", "failed", "completed".
message - Additional message for failed handoff.

Returns:

handoff event.

Applies to