com.threerings.whirled.zone.client

## Class ZoneAdapter

- java.lang.Object
- - com.threerings.whirled.zone.client.ZoneAdapter

All Implemented Interfaces:
  ZoneObserver

    public class ZoneAdapter
    extends Object
    implements ZoneObserver

The zone adapter makes life easier for a class that really only cares about one or two of the zone observer callbacks and doesn't want to provide empty implementations of the others. One can either extend zone adapter, or create an anonymous instance that overrides the desired callback(s).

See Also:
  `ZoneObserver`

### Constructor Summary

Constructors
Constructor and Description
`ZoneAdapter()`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `zoneChangeFailed(String reason)` This is called on all zone observers when a zone change request is rejected by the server or fails for some other reason.
`void` `zoneDidChange(ZoneSummary summary)` Called when we have switched to a new zone.
`void` `zoneWillChange(int zoneId)` Called when we begin the process of switching to a new zone.

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

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

### Constructor Detail

#### ZoneAdapter

    public ZoneAdapter()

### Method Detail

#### zoneWillChange

    public void zoneWillChange(int zoneId)

Description copied from interface: `ZoneObserver`
Called when we begin the process of switching to a new zone. This will be followed by a call to `ZoneObserver.zoneDidChange(com.threerings.whirled.zone.data.ZoneSummary)` to indicate that the change was successful or `ZoneObserver.zoneChangeFailed(java.lang.String)` if the change fails.

Specified by:
  `zoneWillChange` in interface `ZoneObserver`
Parameters:
  `zoneId` - the zone id of the zone to which we are changing.

#### zoneDidChange

    public void zoneDidChange(ZoneSummary summary)

Description copied from interface: `ZoneObserver`
Called when we have switched to a new zone.

Specified by:
  `zoneDidChange` in interface `ZoneObserver`
Parameters:
  `summary` - the summary information for the new zone or null if we have switched to no zone.

#### zoneChangeFailed

    public void zoneChangeFailed(String reason)

Description copied from interface: `ZoneObserver`
This is called on all zone observers when a zone change request is rejected by the server or fails for some other reason.

Specified by:
  `zoneChangeFailed` in interface `ZoneObserver`
Parameters:
  `reason` - the reason code that explains why the zone change request was rejected or otherwise failed.