public static class DeviceSession.Builder
extends java.lang.Object
DeviceSession
.Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
country |
protected java.util.Date |
created |
protected java.lang.String |
ipAddress |
protected java.lang.String |
sessionId |
protected java.util.Date |
updated |
Modifier | Constructor and Description |
---|---|
protected |
Builder(java.lang.String sessionId) |
Modifier and Type | Method and Description |
---|---|
DeviceSession |
build()
Builds an instance of
DeviceSession configured with this
builder's values |
DeviceSession.Builder |
withCountry(java.lang.String country)
Set value for optional field.
|
DeviceSession.Builder |
withCreated(java.util.Date created)
Set value for optional field.
|
DeviceSession.Builder |
withIpAddress(java.lang.String ipAddress)
Set value for optional field.
|
DeviceSession.Builder |
withUpdated(java.util.Date updated)
Set value for optional field.
|
protected final java.lang.String sessionId
protected java.lang.String ipAddress
protected java.lang.String country
protected java.util.Date created
protected java.util.Date updated
public DeviceSession.Builder withIpAddress(java.lang.String ipAddress)
ipAddress
- The IP address of the last activity from this
session.public DeviceSession.Builder withCountry(java.lang.String country)
country
- The country from which the last activity from this
session was made.public DeviceSession.Builder withCreated(java.util.Date created)
created
- The time this session was created.public DeviceSession.Builder withUpdated(java.util.Date updated)
updated
- The time of the last activity from this session.public DeviceSession build()
DeviceSession
configured with this
builder's valuesDeviceSession