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