Fixes To 7400 DarkMud Code
16may09 CmdrZin
rev: 17may09 CmdrZin

Fixes to make the JavaOne 7400 Darkmud example source code compatable with sgs-0.9.9 client and server.

1.  com.sun.sgs.darkmud.client
            import com.sun.sgs.client.SessionId;    Not used anymore??
                class MapFrame implements ClientChannelListener and defines the receivedMessage() method.
                This methods prototype does not use SessionId. It only has two parameters, not three.
                Also, sessionId is not used by the method for anything. Therefore, removing it.
                Added import java.nio.ByteBuffer;
                Change receivedMessage to match ClientChannelListener abstract by using ByteBuffer and
                then used byte[] b = message.array(); so the rest of the code would work unchanged.
2a. com.sun.sgs.darkmud.client
            Same type of problem as #1.
            Changed receivedMessage to use ByteBuffer. This does nothing now. See what happens later.
2b. com.sun.sgs.darkmud.client
            send() method doesn't match SimpleClient.send(). It uses ByteBuffer instead of byte[]
                txtInput is a JTextField and .getText().getBytes() returns a byte array, so use ByteBuffer.wrap()
                to convert array into ByteBuffer.
2c. com.sun.sgs.darkmud.client
            receivedMessage( byte[] ) method doesn't match ServerSessionListener method. It now uses ByteBuffer.
            Use ByteBuffer and then cast into byte[] for use with code.
3a. com.sun.sgs.darkmud.core
            getInventory() errors because MugObject.class is not compatable for ref.get()
            Never seen this code construct before
                for (ManagedReference ref : inventory) {
           So changed code to use Iterator to pull itmes out of inventory.
3b. com.sun.sgs.darkmud.core
            isInInventory() error same as #3a.
3c. com.sun.sgs.darkmud.core
            parse() error
            Use (MudObject)container.get() instead on container.get(MudObject.class)
            Use Iterator to get objects to check OuterCommands.
3d. com.sun.sgs.darkmud.core
            getContainer() error
            Use (MudObject)containerRef.get() instead on containerRef.get(MudObject.class)
4a. com.sun.sgs.darkmud
            loggedIn() error
            Use (Room)startRoomRef.getForUpdate() instead on startRoomRef.getForUpdate(Room.class)
            Added import java.nio.ByteBuffer;
            Changes bcast.send() to use ByteBuffer and session instead of only byte[].
4b. com.sun.sgs.darkmud
            lookupUser() error
            Use (MudUser) AppContext. instead of .getBinding(.., MudUser.class)
4c. com.sun.sgs.darkmud
            registerHelpCommain() error
            getHelpCommands() error
            getHelpDescription() error
            All of these are fixed by casting return to (HelpCommands) and removeing the HelpCommand.class parameter from the call.
5.   com.sun.sgs.darkmud
            Abstracts receivedMessage() with byte[] instead of ByteBuffer.
            Change declaration to use ByteBuffer
6.   com.sun.sgs.darkmud.ambiance
            run() changed to walk through all ClientSessions to send ambiance message out
7.  com.sun.sgs.darkmud.chasm
            run() error
            Change to get FlightSpell then call cancelSpell()
8a. com.sun.sgs.darkmud.core
            commitCommand() error same as #4a
            Use (Room) cast
            ArrivalTask class
                run() error
                Usse (MudObject) cast
8b. com.sun.sgs.darkmud.core
            getBinding() error
            Remove IdManager.class parameter from .get call
9. com.sun.sgs.darkmud.core
            joinChannel() error
            Remove null parameter from .leave() call
            sendToUser() error
            Convert text to ByteBuffer to use .send() and add session.
            Add import java.nio.ByteBuffer;
            Remove session.disconnect()..not supported and not needed. leaveChannel() does it.
            recievedMessage() error
            Use ByteBuffer instead of byte[] and convert byte[] with .array() method.
            run() error
            User (Room) cast and remove Room.class parameter.
            Change channel.send() to use Iterator and send to all channel sessions.
            buildDoorModle() error
               Use (Room) cast for .get()
            walkModle() error
               Use (Room) cast for .get() then use Room object for getInventory()
11a.  com.sun.sgs.darkmud.trapdoor
            run() error
            Use Rug object for access to .attachToTrapDoor()
11b.  com.sun.sgs.darkmud.trapdoor
            setDestination() error
            Same as #3a, use Iterator to walk though inventory.
11c.  com.sun.sgs.darkmud.trapdoor
            cover() error
            Use TrapDoor object explicitly.
            Use Rope object explicitly.
11d.  com.sun.sgs.darkmud.trapdoor
            uncover() error
            Use TrapDoor object explicitly.
            Use Rope object explicitly.
11e.  com.sun.sgs.darkmud.trapdoor
            tieRope() error
            untieRope() error
            addAnnotation() error
            removeAnnotation() error
            Use TrapDoor object explicitly.

That's it.