Package 

Class DisconnectionDetails


  • 
    public class DisconnectionDetails
    
                        

    Details about why a conversation session was disconnected.

    This sealed class represents the different reasons a conversation can end:

    • Error: An error occurred during the conversation

    • Agent: The agent ended the conversation

    • User: The user ended the conversation

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public final class DisconnectionDetails.Error

      Disconnection due to an error

      public class DisconnectionDetails.Agent

      Disconnection initiated by the remote side rather than by a local call to disconnect()/endSession().

      For text-only (WebSocket) sessions this also covers cases where the SDK can't tell why the remote side closed the connection, e.g. the agent gracefully ending the conversation vs. the server enforcing an idle/inactivity timeout - both close the socket normally without the client having asked for it, so both surface as Agent.

      public class DisconnectionDetails.User

      Disconnection initiated by the user, i.e. as a direct result of a local call to disconnect()/endSession(). Never fired for a connection that timed out or was closed by the remote side on its own.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private final String reason
    • Method Summary

      Modifier and Type Method Description
      final String getReason()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait