|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.crowd.chat.server.SpeakHandler
public class SpeakHandler
Wires up the SpeakService to a particular distributed object. A server entity can make
"speech" available among the subscribers of a particular distributed object by constructing a
speak handler and registering it with the InvocationManager, then placing the resulting
marshaller into the distributed object in question so that subscribers to that object can use it
to generate "speak" requests on that object.
| Nested Class Summary | |
|---|---|
static interface |
SpeakHandler.SpeakerValidator
Used to prevent abitrary users from issuing speak requests. |
| Field Summary | |
|---|---|
protected BodyLocator |
_locator
Used for acquiring BodyObject references from Names and ClientObjects. |
protected DObject |
_speakObj
Our speech object. |
protected SpeakHandler.SpeakerValidator |
_validator
The entity that will validate our speakers. |
| Constructor Summary | |
|---|---|
SpeakHandler(BodyLocator locator,
DObject speakObj,
SpeakHandler.SpeakerValidator validator)
Creates a handler that will provide speech on the supplied distributed object. |
|
SpeakHandler(DObject speakObj,
SpeakHandler.SpeakerValidator validator)
Creates a handler that will provide speech on the supplied distributed object. |
|
| Method Summary | |
|---|---|
protected void |
sendSpeak(BodyObject source,
String message,
byte mode)
Sends the actual speak message. |
void |
speak(ClientObject caller,
String message,
byte mode)
Handles a SpeakService.speak(java.lang.String, byte) request. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected BodyLocator _locator
protected DObject _speakObj
protected SpeakHandler.SpeakerValidator _validator
| Constructor Detail |
|---|
public SpeakHandler(DObject speakObj,
SpeakHandler.SpeakerValidator validator)
speakObj - the object for which speech requests will be processed.validator - an optional validator that can be used to prevent arbitrary users from
using the speech services on this object.
public SpeakHandler(BodyLocator locator,
DObject speakObj,
SpeakHandler.SpeakerValidator validator)
locator - the object we use to look up BodyObjects from ClientObjectsspeakObj - the object for which speech requests will be processed.validator - an optional validator that can be used to prevent arbitrary users from
using the speech services on this object.| Method Detail |
|---|
public void speak(ClientObject caller,
String message,
byte mode)
SpeakProviderSpeakService.speak(java.lang.String, byte) request.
speak in interface SpeakProvider
protected void sendSpeak(BodyObject source,
String message,
byte mode)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||