Package com.mrivanplays.jdoa2.internal
Class SessionManagerImpl
java.lang.Object
com.mrivanplays.jdoa2.internal.SessionManagerImpl
- All Implemented Interfaces:
SessionManager
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionokhttp3.OkHttpClient
Returns theObjectMapper
, used to read json from discord api responses.com.fasterxml.jackson.databind.ObjectMapper
Returns theObjectMapper
, used to read json from discord api responses.getSession
(String authCode) newSession
(String authCode) Creates a newJDOA2
session for the specifiedauthCode
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.mrivanplays.jdoa2.SessionManager
getOrCreateSession
-
Constructor Details
-
SessionManagerImpl
-
-
Method Details
-
getSessions
Description copied from interface:SessionManager
Returns unmodifiableMap
, holding all managedJDOA2
instances, key being theauthCode
specified when creating the session.- Specified by:
getSessions
in interfaceSessionManager
- Returns:
- map with managed
JDOA2
instances
-
newSession
Description copied from interface:SessionManager
Creates a newJDOA2
session for the specifiedauthCode
. You can seeApplicationInfo.getAuthCode()
for information about thatauthCode
.- Specified by:
newSession
in interfaceSessionManager
- Parameters:
authCode
- auth code- Returns:
- fresh new jdoa2 session
-
getSession
Description copied from interface:SessionManager
- Specified by:
getSession
in interfaceSessionManager
- Parameters:
authCode
- auth code of the session you want to retrieve- Returns:
- session if exists, optional empty otherwise
-
getHttpClient
Description copied from interface:SessionManager
Returns theObjectMapper
, used to read json from discord api responses.- Specified by:
getHttpClient
in interfaceSessionManager
- Returns:
- json mapper
-
getJsonMapper
Description copied from interface:SessionManager
Returns theObjectMapper
, used to read json from discord api responses.- Specified by:
getJsonMapper
in interfaceSessionManager
- Returns:
- json mapper
-