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 AppletCommunicationStrategy

    java.lang.Object
      ix.applet.AppletCommunicationStrategy

All Implemented Interfaces:
  IPC.CommunicationStrategy

    public class AppletCommunicationStrategy

extends java.lang.Object
implements IPC.CommunicationStrategy

Lets I-P2 applets talk with each other. It can also be used with non-applet instances of `Ip2` if they specify a "base-url" parameter.

See Also:
  `Parameters`

Nested Class Summary
`(package private) static class` | `AppletCommunicationStrategy.ConnectFailure`
`(package private) class` | `AppletCommunicationStrategy.ReceiveThread`

Field Summary
`(package private) boolean` | `ableToSend`
`(package private) Ip2` | `agent`
`(package private) java.net.URL` | `docBase`
`(package private) int` | `expectedSeqNo`
`(package private) IPC.MessageListener` | `messageListener`
`(package private) MessageMemory` | `messageMap`
`(package private) AppletCommunicationTool` | `tool`

Constructor Summary
`AppletCommunicationStrategy()`

Method Summary
`void` | `appletDestroy()`
`void` | `appletStart()`
`void` | `appletStop()`
`protected java.lang.Object` | `decodeReply(java.lang.String text)`
`protected void` | `do_transcript(java.lang.String line)`
`protected java.lang.String` | `encodeForSend(AppletMessage m)`
`(package private) java.lang.String` | `getAgentName()`
`(package private) java.net.URL` | `getDocumentBase()`
`(package private) java.lang.RuntimeException` | `interpretRelayException(java.lang.String text)`
`(package private) java.lang.RuntimeException` | `interpretServerException(java.lang.String text)`
`(package private) boolean` | `isAbleToSend()`
`protected java.io.InputStreamReader` | `makeReader(java.net.URLConnection conn)`
`(package private) void` | `registerAs(java.lang.String name)`
`protected java.lang.Object` | `requestObject(AppletMessage m)` Sends a request to the message server and returns the server's reply.
`void` | `sendObject(java.lang.Object destination, java.lang.Object contents)`
`protected java.lang.String` | `sendText(java.lang.String text)`
`(package private) void` | `serverUnavailable()`
`(package private) void` | `setIsAbleToSend(boolean v)`
`(package private) void` | `setTool(AppletCommunicationTool tool)`
`void` | `setupServer(java.lang.Object destination, IPC.MessageListener listener)`
`protected void` | `transcript(java.lang.String line)`

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

Field Detail

### tool

    AppletCommunicationTool tool

### agent

    Ip2 agent

### docBase

    java.net.URL docBase

### messageListener

    IPC.MessageListener messageListener

### ableToSend

    boolean ableToSend

### expectedSeqNo

    volatile int expectedSeqNo

### messageMap

    MessageMemory messageMap

Constructor Detail

### AppletCommunicationStrategy

    public AppletCommunicationStrategy()

Method Detail

### setTool

    void setTool(AppletCommunicationTool tool)

### getAgentName

    java.lang.String getAgentName()

### isAbleToSend

    boolean isAbleToSend()

### setIsAbleToSend

    void setIsAbleToSend(boolean v)

### getDocumentBase

    java.net.URL getDocumentBase()

### appletStart

    public void appletStart()

### appletStop

    public void appletStop()

### appletDestroy

    public void appletDestroy()

### setupServer

    public void setupServer(java.lang.Object destination,
                            IPC.MessageListener listener)

  Specified by:
    `setupServer` in interface `IPC.CommunicationStrategy`

### registerAs

    void registerAs(java.lang.String name)

### serverUnavailable

    void serverUnavailable()

### transcript

    protected void transcript(java.lang.String line)

### do_transcript

    protected void do_transcript(java.lang.String line)

### sendObject

    public void sendObject(java.lang.Object destination,
                           java.lang.Object contents)

  Specified by:
    `sendObject` in interface `IPC.CommunicationStrategy`

### requestObject

    protected java.lang.Object requestObject(AppletMessage m)

  Sends a request to the message server and returns the server's reply. A string reply that reports an exception is turned into an appropriate exception and then thrown, rather than being returned.

### interpretServerException

    java.lang.RuntimeException interpretServerException(java.lang.String text)

### interpretRelayException

    java.lang.RuntimeException interpretRelayException(java.lang.String text)

### encodeForSend

    protected java.lang.String encodeForSend(AppletMessage m)

### decodeReply

    protected java.lang.Object decodeReply(java.lang.String text)

### sendText

    protected java.lang.String sendText(java.lang.String text)
                                 throws java.net.MalformedURLException,
                                        java.io.IOException

  Throws:
    `java.net.MalformedURLException`
    `java.io.IOException`

### makeReader

    protected java.io.InputStreamReader makeReader(java.net.URLConnection conn)
                                            throws java.io.IOException,
                                                   java.io.UnsupportedEncodingException

  Throws:
    `java.io.IOException`
    `java.io.UnsupportedEncodingException`

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