|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dsto.dfc.databeans.AbstractDataObject dsto.dfc.databeans.SimpleDataObject dsto.dfc.databeans.FancyDataObject livespace.services.Entity livespace.services.entities.RoomEntity
public class RoomEntity
Defines the default Livespace Room entity.
Field Summary | |
---|---|
String |
datastore
Base URI for room-wide read/write persistent file storage. |
static String |
ENTITY_TYPE
|
String |
mediaBaseURL
Base URI for media such as sound, movies etc. |
SetDataObject |
serviceTypes
The names of known service types in this room. |
Fields inherited from class livespace.services.Entity |
---|
container, id, lastTouched, name, unconfirmedUpdates |
Fields inherited from class dsto.dfc.databeans.AbstractDataObject |
---|
listeners |
Fields inherited from interface dsto.dfc.databeans.IDataObject |
---|
OVERRIDE, PERSISTENT, PERSISTENT_OVERRIDE, TRANSIENT, TRANSIENT_OVERRIDE |
Constructor Summary | |
---|---|
RoomEntity()
Should be protected, but public due to issues with applets under 1.4.2. |
|
RoomEntity(String name)
|
|
RoomEntity(String id,
String name)
|
Method Summary | |
---|---|
static RoomEntity |
createLocalRoom(Elvin elvin)
Find or create a room entity instance. |
static void |
disposeLocalRoom()
Dispose the client/server container for the local room (if any). |
static RoomEntity |
getLocalRoom(Elvin elvin)
Find the local room entity instance. |
String |
getType()
The type of the object (eg "room", "light", "volume", etc). |
Methods inherited from class livespace.services.Entity |
---|
create, createId, getElvin, getType, getTypeInfo, mutex, sameEntity, shallowClone, waitForProperty, waitForProperty, waitForProperty, waitForProperty |
Methods inherited from class dsto.dfc.databeans.FancyDataObject |
---|
childPropertyChanged, getValue, isTransient, propertyIterator, setValue |
Methods inherited from class dsto.dfc.databeans.SimpleDataObject |
---|
getFieldNames, setValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String ENTITY_TYPE
public String datastore
public String mediaBaseURL
public SetDataObject serviceTypes
Constructor Detail |
---|
public RoomEntity()
public RoomEntity(String name)
public RoomEntity(String id, String name)
Method Detail |
---|
public String getType()
Entity
NOTE: it is also a good practice to provide a static field that defines the entity type on the class: eg
public static final String ENTITY_TYPE = "room";
getType
in class Entity
public static RoomEntity createLocalRoom(Elvin elvin) throws IOException
getLocalRoom(Elvin)
, if no room has been
found/created yet, this will create a default room entity
suitable for testing purposes. If you don't know which one you
want, then use getLocalRoom(Elvin)
.
NOTE: this may create an EntityServer to host the room. Clients should call disposeLocalRoom () to ensure proper shutdown.
elvin
- The elvin service.
SynchronizationException
- if the local room could not be
discovered
IOException
- if a general IO error occurs.getLocalRoom(Elvin)
public static RoomEntity getLocalRoom(Elvin elvin) throws SynchronizationException, IOException
NOTE: this creates an EntityClient to host the room. Clients should call disposeLocalRoom () to ensure proper shutdown.
elvin
- The elvin service.
SynchronizationException
- if the local room could not be
discovered
IOException
- if a general IO error occurs.createLocalRoom(Elvin)
public static void disposeLocalRoom()
getLocalRoom(Elvin)
,
createLocalRoom(Elvin)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |