Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## ix.applet
Class MessageServer

    java.lang.Object
      ix.applet.MessageServer

    public class MessageServer

extends java.lang.Object

Handles messages for an `AppletCommunicationStrategy`.

Nested Class Summary
`(package private) static class` | `MessageServer.Strategy` A communication strategy used by both the message-server and its clients.
`protected class` | `MessageServer.User`
`protected class` | `MessageServer.UserMessageThread`

Field Summary
`(package private) ServiceAddress` | `addr`
`(package private) java.util.Date` | `startupDate`
`(package private) MessageServer.Strategy` | `strategy`

Constructor Summary
`MessageServer()`

Method Summary
`protected java.lang.String` | `agoTime(java.util.Date then, java.util.Date now)`
`(package private) void` | `checkSender(AppletMessage m)`
`(package private) void` | `clientService(ObjectStreamConnection connection)`
`(package private) AppletMessage` | `evalGetMessage(AppletMessage m, ObjectStreamConnection conn)`
`(package private) java.lang.Object` | `evalMessage(AppletMessage m, ObjectStreamConnection conn)`
`(package private) java.lang.String` | `evalRegisterAs(AppletMessage m)`
`(package private) java.lang.String` | `evalSendTo(AppletMessage m)`
`(package private) java.lang.String` | `evalServerStatus(AppletMessage m)`
`protected MessageServer.User` | `getUser(java.lang.String name)`
`protected java.util.List` | `getUsers()`
`(package private) void` | `handleMessage(ObjectStreamConnection connection, java.lang.Object contents)`
`static void` | `main(java.lang.String[] argv)`
`protected void` | `recordUser(MessageServer.User user)`
`protected void` | `removeUser(MessageServer.User user)`
`(package private) java.lang.Object` | `sendReply(ObjectStreamConnection connection, java.lang.Object reply)`
`(package private) void` | `serveClientOn(ObjectStreamConnection connection)`
`(package private) void` | `start()`
`(package private) AppletMessage` | `unpackRequest(java.lang.Object contents)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### addr

    ServiceAddress addr

### strategy

    MessageServer.Strategy strategy

### startupDate

    java.util.Date startupDate

Constructor Detail

### MessageServer

    public MessageServer()

Method Detail

### main

    public static void main(java.lang.String[] argv)

### start

    void start()
         throws java.lang.Exception

  Throws:
    `java.lang.Exception`

### serveClientOn

    void serveClientOn(ObjectStreamConnection connection)

### clientService

    void clientService(ObjectStreamConnection connection)

### handleMessage

    void handleMessage(ObjectStreamConnection connection,
                       java.lang.Object contents)

### unpackRequest

    AppletMessage unpackRequest(java.lang.Object contents)

### sendReply

    java.lang.Object sendReply(ObjectStreamConnection connection,
                               java.lang.Object reply)

### evalMessage

    java.lang.Object evalMessage(AppletMessage m,
                                 ObjectStreamConnection conn)

### evalRegisterAs

    java.lang.String evalRegisterAs(AppletMessage m)

### evalSendTo

    java.lang.String evalSendTo(AppletMessage m)

### evalGetMessage

    AppletMessage evalGetMessage(AppletMessage m,
                                 ObjectStreamConnection conn)

### checkSender

    void checkSender(AppletMessage m)

### evalServerStatus

    java.lang.String evalServerStatus(AppletMessage m)

### agoTime

    protected java.lang.String agoTime(java.util.Date then,
                                       java.util.Date now)

### getUser

    protected MessageServer.User getUser(java.lang.String name)

### getUsers

    protected java.util.List getUsers()

### recordUser

    protected void recordUser(MessageServer.User user)

### removeUser

    protected void removeUser(MessageServer.User user)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD