org.elkoserver.server.context.users
Class DeviceEphemeralUserFactory
java.lang.Object
org.elkoserver.server.context.users.DevicePersistentUserFactory
org.elkoserver.server.context.users.DeviceEphemeralUserFactory
- All Implemented Interfaces:
- UserFactory
public class DeviceEphemeralUserFactory
- extends DevicePersistentUserFactory
Factory that generates a non-persistent user object from connected mobile
device information.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DeviceEphemeralUserFactory
@JSONMethod(value="device")
public DeviceEphemeralUserFactory(String device)
- JSON-driven constructor.
- Parameters:
device - The name of the device (IOS, etc).
provideUser
public void provideUser(Contextor contextor,
Connection connnection,
JSONObject param,
ArgRunnable handler)
- Synthesize an ephemeral user object based on user description info
fetched from the Device.
- Specified by:
provideUser in interface UserFactory- Overrides:
provideUser in class DevicePersistentUserFactory
- Parameters:
contextor - The contextor of the server in which the synthetic
user will be presentconnection - The connection over which the new user presented
themself.param - Arbitary JSON object parameterizing the construction.handler - Handler to invoke with the resulting user object, or
with null if the user object could not be produced.