Class GenericFieldBroadcaster
java.lang.Object
org.web3d.vrml.scripting.external.neteai.GenericFieldBroadcaster
- All Implemented Interfaces:
FieldBroadcaster
Simple implementation of the FieldBroadcaster interface.
This broadcaster must use a separate broadcasting thread because
ClientProcessingTask's thread can't be used for processing user
requests (it ends up blocking and waiting for itself).
-
Method Summary
Modifier and TypeMethodDescriptionbooleanaddVrmlEventListener(int fieldID, int fieldType, VrmlEventListener l) Add a listener for a given field ID.voidgenerateFieldBroadcast(int fieldID, DataInputStream dis) Generate the broadcast of a field changed event for a given field ID.getUserData(int fieldID) Get the user data associated with a fieldbooleanremoveVrmlEventListener(int fieldID, VrmlEventListener l) Remove a listener for a given field IDvoidsetUserData(int fieldID, Object data) Set the user data associated with a field
-
Method Details
-
generateFieldBroadcast
Description copied from interface:FieldBroadcasterGenerate the broadcast of a field changed event for a given field ID. Reads the field value off the network and then adds the field to the work list.- Specified by:
generateFieldBroadcastin interfaceFieldBroadcaster- Parameters:
fieldID- The network ID of the field which changeddis- The input stream to read the field value from- Throws:
IOException
-
removeVrmlEventListener
Description copied from interface:FieldBroadcasterRemove a listener for a given field ID- Specified by:
removeVrmlEventListenerin interfaceFieldBroadcaster- Parameters:
fieldID- The network field ID to remove a listener froml- The listener for the field- Returns:
- Was that the last listener for this field ID?
- See Also:
-
addVrmlEventListener
Description copied from interface:FieldBroadcasterAdd a listener for a given field ID. Need to specify the field type so that the broadcast system knows what to generate.- Specified by:
addVrmlEventListenerin interfaceFieldBroadcaster- Parameters:
fieldID- The network field ID to add a listener forfieldType- The type of the fieldl- The listener for the field- Returns:
- Was that the first listener for this field ID?
-
getUserData
Description copied from interface:FieldBroadcasterGet the user data associated with a field- Specified by:
getUserDatain interfaceFieldBroadcaster- Parameters:
fieldID- The network ID of the field- Returns:
- The user data associated with the field
- See Also:
-
setUserData
Description copied from interface:FieldBroadcasterSet the user data associated with a field- Specified by:
setUserDatain interfaceFieldBroadcaster- Parameters:
fieldID- The network ID of the fielddata- The user data associated the the field- See Also:
-