1 Restore the default message handler. The handlers used for LoginByToken are not used in subsequent calls to the vSphere API. The following example shows Java code that restores the vCenter session. This code requires the vCenter URL and the cookie and default handler that were retrieved before login. See Sample Code.Example: Restoring the vCenter Server Session