endSession
endSession(String sessionID)
endSession 메소드는 런타임 세션 종료를 표시합니다. 런타임 서버는 이 메소드를 수신하면 기록에 로그하고 메모리 등을 지웁니다.
*
sessionID - 세션을 식별하는 고유 문자열입니다.
endSession 메소드가 호출되면, 런타임 세션 제한시간이 초과됩니다. sessionTimeout 특성을 사용하여 제한시간 기간을 구성할 수 있습니다.
리턴 값
런타임 서버는 다음 속성이 채워진 Response 오브젝트로 endSession에 응답합니다.
*
*
*
*
다음 예는endSession 메소드 및 응답 구문 분석 방법을 표시합니다. sessionId는 이 세션을 시작한 startSession 호출에서 사용되는 세션을 식별할 동일한 문자열입니다.
response = api.endSession(sessionId);
// check if response is successful or not
if(response.getStatusCode() == Response.STATUS_SUCCESS)
{
System.out.println("endSession call processed with no warnings or errors");
}
else if(response.getStatusCode() == Response.STATUS_WARNING)
{
System.out.println("endSession call processed with a warning");
}
else
{
System.out.println("endSession call processed with an error");
}
// For any non-successes, there should be advisory messages explaining why
if(response.getStatusCode() != Response.STATUS_SUCCESS)
printDetailMessageOfWarningOrError("endSession",
response.getAdvisoryMessages());