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