com.threerings.whirled.spot.server

## Class SpotSceneRegistry

- java.lang.Object
- - com.threerings.whirled.server.SceneRegistry
  - - com.threerings.whirled.spot.server.SpotSceneRegistry

All Implemented Interfaces:
  com.threerings.crowd.data.LocationCodes, com.threerings.presents.data.InvocationCodes, com.threerings.presents.server.InvocationProvider, SceneCodes, SceneProvider, SpotProvider

    public class SpotSceneRegistry
    extends SceneRegistry
    implements SpotProvider

Extends the `SceneRegistry` with spot-related services.

### Nested Class Summary

### Nested classes/interfaces inherited from class com.threerings.whirled.server.SceneRegistry

`SceneRegistry.ConfigFactory, SceneRegistry.ResolutionListener`

### Field Summary

### Fields inherited from interface com.threerings.whirled.data.SceneCodes

`SCENE_UPDATE, WHIRLED_GROUP`

### Fields inherited from interface com.threerings.crowd.data.LocationCodes

`ALREADY_THERE, MOVE_IN_PROGRESS, NO_SUCH_PLACE`

### Fields inherited from interface com.threerings.presents.data.InvocationCodes

`ACCESS_DENIED, E_ACCESS_DENIED, E_INTERNAL_ERROR, GLOBAL_GROUP, INTERNAL_ERROR`

### Constructor Summary

Constructors
Constructor and Description
`SpotSceneRegistry(com.threerings.presents.server.InvocationManager invmgr)` Constructs a spot scene registry.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `changeLocation(com.threerings.presents.data.ClientObject caller, int sceneId, Location loc, com.threerings.presents.client.InvocationService.ConfirmListener listener)` Handles a `SpotService.changeLocation(int, com.threerings.whirled.spot.data.Location, com.threerings.presents.client.InvocationService.ConfirmListener)` request.
`void` `clusterSpeak(com.threerings.presents.data.ClientObject caller, String message, byte mode)` Handles a `SpotService.clusterSpeak(java.lang.String, byte)` request.
`void` `joinCluster(com.threerings.presents.data.ClientObject caller, int friendOid, com.threerings.presents.client.InvocationService.ConfirmListener listener)` Handles a `SpotService.joinCluster(int, com.threerings.presents.client.InvocationService.ConfirmListener)` request.

`void`

`sendClusterChatMessage(int sceneId, int speakerOid, com.threerings.util.Name speaker, String bundle, String message, byte mode)`
Sends a cluster chat notification to the specified location in the specified place object originating with the specified speaker (the speaker can be a server entity that wishes to fake a "speak" message, in which case the bundle argument should be non-null and should contain the id of the bundle to be used to translate the message text) and with the supplied message content.

`void` `sendClusterChatMessage(int sceneId, int speakerOid, com.threerings.crowd.chat.data.UserMessage message)` Sends a cluster chat notification to the specified location in the specified place object originating with the specified speaker.
`void` `traversePortal(com.threerings.presents.data.ClientObject caller, int sceneId, int portalId, int destSceneVer, SpotService.SpotSceneMoveListener listener)` Handles a `SpotService.traversePortal(int, int, int, com.threerings.whirled.spot.client.SpotService.SpotSceneMoveListener)` request.

### Methods inherited from class com.threerings.whirled.server.SceneRegistry

`getSceneManager, getSceneRepository, leaveOccupiedScene, moveBody, moveTo, resolveScene, where`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### SpotSceneRegistry

    @Inject
    public SpotSceneRegistry(com.threerings.presents.server.InvocationManager invmgr)

Constructs a spot scene registry.

### Method Detail

#### sendClusterChatMessage

    public void sendClusterChatMessage(int sceneId,
                                       int speakerOid,
                                       com.threerings.util.Name speaker,
                                       String bundle,
                                       String message,
                                       byte mode)

Sends a cluster chat notification to the specified location in the specified place object originating with the specified speaker (the speaker can be a server entity that wishes to fake a "speak" message, in which case the bundle argument should be non-null and should contain the id of the bundle to be used to translate the message text) and with the supplied message content.

Parameters:
  `sceneId` - the scene id in which to deliver the chat message.
  `speakerOid` - the body object id of the speaker (used to verify that they are in the cluster in question).
  `speaker` - the username of the user that generated the message (or some special speaker name for server messages).
  `bundle` - the bundle identifier that will be used by the client to translate the message text (or null if the message originated from a real live human who wrote it in their native tongue).
  `message` - the text of the chat message.

#### sendClusterChatMessage

    public void sendClusterChatMessage(int sceneId,
                                       int speakerOid,
                                       com.threerings.crowd.chat.data.UserMessage message)

Sends a cluster chat notification to the specified location in the specified place object originating with the specified speaker.

Parameters:
  `sceneId` - the scene id in which to deliver the chat message.
  `speakerOid` - the body object id of the speaker (used to verify that they are in the cluster in question).
  `message` - the message.

#### traversePortal

    public void traversePortal(com.threerings.presents.data.ClientObject caller,
                               int sceneId,
                               int portalId,
                               int destSceneVer,
                               SpotService.SpotSceneMoveListener listener)
                        throws com.threerings.presents.server.InvocationException

Description copied from interface: `SpotProvider`
Handles a `SpotService.traversePortal(int, int, int, com.threerings.whirled.spot.client.SpotService.SpotSceneMoveListener)` request.

Specified by:
  `traversePortal` in interface `SpotProvider`
Throws:
  `com.threerings.presents.server.InvocationException`

#### changeLocation

    public void changeLocation(com.threerings.presents.data.ClientObject caller,
                               int sceneId,
                               Location loc,
                               com.threerings.presents.client.InvocationService.ConfirmListener listener)
                        throws com.threerings.presents.server.InvocationException

Description copied from interface: `SpotProvider`
Handles a `SpotService.changeLocation(int, com.threerings.whirled.spot.data.Location, com.threerings.presents.client.InvocationService.ConfirmListener)` request.

Specified by:
  `changeLocation` in interface `SpotProvider`
Throws:
  `com.threerings.presents.server.InvocationException`

#### joinCluster

    public void joinCluster(com.threerings.presents.data.ClientObject caller,
                            int friendOid,
                            com.threerings.presents.client.InvocationService.ConfirmListener listener)
                     throws com.threerings.presents.server.InvocationException

Description copied from interface: `SpotProvider`
Handles a `SpotService.joinCluster(int, com.threerings.presents.client.InvocationService.ConfirmListener)` request.

Specified by:
  `joinCluster` in interface `SpotProvider`
Throws:
  `com.threerings.presents.server.InvocationException`

#### clusterSpeak

    public void clusterSpeak(com.threerings.presents.data.ClientObject caller,
                             String message,
                             byte mode)

Description copied from interface: `SpotProvider`
Handles a `SpotService.clusterSpeak(java.lang.String, byte)` request.

Specified by:
  `clusterSpeak` in interface `SpotProvider`