Package com.dropbox.core.v2.team
Class ActiveWebSession
java.lang.Object
com.dropbox.core.v2.team.DeviceSession
com.dropbox.core.v2.team.ActiveWebSession
Information on active web sessions.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionActiveWebSession(String sessionId, String userAgent, String os, String browser) Information on active web sessions.ActiveWebSession(String sessionId, String userAgent, String os, String browser, String ipAddress, String country, Date created, Date updated, Date expires) Information on active web sessions. -
Method Summary
Modifier and TypeMethodDescriptionbooleanInformation on the browser used for this web session.The country from which the last activity from this session was made.The time this session was created.The time this session expires.The IP address of the last activity from this session.getOs()Information on the hosting operating system.The session id.The time of the last activity from this session.Information on the hosting device.inthashCode()static ActiveWebSession.BuildernewBuilder(String sessionId, String userAgent, String os, String browser) Returns a new builder for creating an instance of this class.toString()Returns a String representation of this object formatted for easier readability.Methods inherited from class com.dropbox.core.v2.team.DeviceSession
newBuilder
-
Field Details
-
userAgent
-
os
-
browser
-
expires
-
-
Constructor Details
-
ActiveWebSession
public ActiveWebSession(@Nonnull String sessionId, @Nonnull String userAgent, @Nonnull String os, @Nonnull String browser, @Nullable String ipAddress, @Nullable String country, @Nullable Date created, @Nullable Date updated, @Nullable Date expires) Information on active web sessions.Use
newBuilder(java.lang.String,java.lang.String,java.lang.String,java.lang.String)to create instances of this class without specifying values for all optional fields.- Parameters:
sessionId- The session id. Must not benull.userAgent- Information on the hosting device. Must not benull.os- Information on the hosting operating system. Must not benull.browser- Information on the browser used for this web session. Must not benull.ipAddress- The IP address of the last activity from this session.country- The country from which the last activity from this session was made.created- The time this session was created.updated- The time of the last activity from this session.expires- The time this session expires.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.
-
ActiveWebSession
public ActiveWebSession(@Nonnull String sessionId, @Nonnull String userAgent, @Nonnull String os, @Nonnull String browser) Information on active web sessions.The default values for unset fields will be used.
- Parameters:
sessionId- The session id. Must not benull.userAgent- Information on the hosting device. Must not benull.os- Information on the hosting operating system. Must not benull.browser- Information on the browser used for this web session. Must not benull.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.
-
-
Method Details
-
getSessionId
The session id.- Overrides:
getSessionIdin classDeviceSession- Returns:
- value for this field, never
null.
-
getUserAgent
Information on the hosting device.- Returns:
- value for this field, never
null.
-
getOs
Information on the hosting operating system.- Returns:
- value for this field, never
null.
-
getBrowser
Information on the browser used for this web session.- Returns:
- value for this field, never
null.
-
getIpAddress
The IP address of the last activity from this session.- Overrides:
getIpAddressin classDeviceSession- Returns:
- value for this field, or
nullif not present.
-
getCountry
The country from which the last activity from this session was made.- Overrides:
getCountryin classDeviceSession- Returns:
- value for this field, or
nullif not present.
-
getCreated
The time this session was created.- Overrides:
getCreatedin classDeviceSession- Returns:
- value for this field, or
nullif not present.
-
getUpdated
The time of the last activity from this session.- Overrides:
getUpdatedin classDeviceSession- Returns:
- value for this field, or
nullif not present.
-
getExpires
The time this session expires.- Returns:
- value for this field, or
nullif not present.
-
newBuilder
public static ActiveWebSession.Builder newBuilder(String sessionId, String userAgent, String os, String browser) Returns a new builder for creating an instance of this class.- Parameters:
sessionId- The session id. Must not benull.userAgent- Information on the hosting device. Must not benull.os- Information on the hosting operating system. Must not benull.browser- Information on the browser used for this web session. Must not benull.- Returns:
- builder for this class.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.
-
hashCode
public int hashCode()- Overrides:
hashCodein classDeviceSession
-
equals
- Overrides:
equalsin classDeviceSession
-
toString
- Overrides:
toStringin classDeviceSession
-
toStringMultiline
Returns a String representation of this object formatted for easier readability.The returned String may contain newlines.
- Overrides:
toStringMultilinein classDeviceSession- Returns:
- Formatted, multiline String representation of this object
-