public abstract class BrowserChannel extends Object
Modifier and Type | Class and Description |
---|---|
protected static class |
BrowserChannel.CheckVersionsMessage
The initial request from the client, supplies a range of supported versions
and the version from hosted.html (so stale copies on an external server
can be detected).
|
protected static class |
BrowserChannel.ChooseTransportMessage
A message from the client giving a list of supported connection methods
and requesting the server choose one of them to switch protocol traffic to.
|
protected static class |
BrowserChannel.FatalErrorMessage
A message reporting a connection error to the client.
|
protected static class |
BrowserChannel.FreeMessage
A message asking the other side to free object references.
|
protected static class |
BrowserChannel.InvokeOnClientMessage
A request from the server to invoke a function on the client.
|
protected static class |
BrowserChannel.InvokeOnServerMessage
A request from the client to invoke a function on the server.
|
protected static class |
BrowserChannel.InvokeSpecialMessage
A request from the to invoke a function on the other side.
|
static class |
BrowserChannel.JavaObjectRef
Class representing a reference to a Java object.
|
static class |
BrowserChannel.JsObjectRef
Class representing a reference to a JS object.
|
protected static class |
BrowserChannel.LoadJsniMessage
A message sending JSNI code to be evaluated.
|
protected static class |
BrowserChannel.LoadModuleMessage
A request from the client that the server load and initialize a given
module.
|
protected static class |
BrowserChannel.Message
Abstract base class of OOPHM messages.
|
static class |
BrowserChannel.MessageType
Enumeration of message type ids.
|
protected static interface |
BrowserChannel.ObjectRefFactory
Provides a way of allocating JS and Java object ids without knowing
which one is the remote type, so code can be shared between client and
server.
|
protected static class |
BrowserChannel.OldLoadModuleMessage
A request from the client that the server load and initialize a given
module (original v1 version).
|
protected static class |
BrowserChannel.ProtocolVersionMessage
Reports the selected protocol version.
|
protected static class |
BrowserChannel.QuitMessage
A message signifying a soft close of the communications channel.
|
static class |
BrowserChannel.RemoteDeathError
An error indicating that the remote side died and we should unroll the
call stack as painlessly as possible to allow cleanup.
|
static interface |
BrowserChannel.RemoteObjectRef
Represents an object on the other side of the channel, known to this side
by an reference ID.
|
protected static class |
BrowserChannel.RequestIconMessage
A message asking the client to send an icon suitable for use in the UI.
|
protected static class |
BrowserChannel.ReturnMessage
Signifies a return from a previous invoke.
|
static class |
BrowserChannel.SessionHandler<T extends BrowserChannel>
Hook interface for responding to messages.
|
protected static class |
BrowserChannel.SwitchTransportMessage
A response to ChooseTransport telling the client which transport should
be used for the remainder of the protocol.
|
protected static class |
BrowserChannel.UserAgentIconMessage
A message supplying an icon, which fits in 24x24 and in a standard image
format such as PNG or GIF, suitable for use in the UI.
|
static class |
BrowserChannel.Value
Represents a value for BrowserChannel.
|
Modifier and Type | Field and Description |
---|---|
static int |
PROTOCOL_VERSION_CURRENT
The current version of the protocol.
|
static int |
PROTOCOL_VERSION_GET_ICON
The protocol version that added the GetIcon message.
|
static int |
PROTOCOL_VERSION_OLDEST
The oldest protocol version supported by this code.
|
static int |
SPECIAL_CLIENTMETHODS_OBJECT |
static int |
SPECIAL_SERVERMETHODS_OBJECT |
Modifier | Constructor and Description |
---|---|
protected |
BrowserChannel(InputStream inputStream,
OutputStream outputStream,
BrowserChannel.ObjectRefFactory objectRefFactory) |
|
BrowserChannel(Socket socket,
BrowserChannel.ObjectRefFactory objectRefFactory) |
public static final int PROTOCOL_VERSION_CURRENT
public static final int PROTOCOL_VERSION_OLDEST
public static final int PROTOCOL_VERSION_GET_ICON
public static final int SPECIAL_CLIENTMETHODS_OBJECT
public static final int SPECIAL_SERVERMETHODS_OBJECT
public BrowserChannel(Socket socket, BrowserChannel.ObjectRefFactory objectRefFactory) throws IOException
IOException
protected BrowserChannel(InputStream inputStream, OutputStream outputStream, BrowserChannel.ObjectRefFactory objectRefFactory)
protected static BrowserChannel.JavaObjectRef getJavaObjectRef(int refId)
protected static String readUtf8String(DataInputStream stream) throws IOException
IOException
protected static BrowserChannel.Value.ValueType readValueType(DataInputStream stream) throws IOException, BrowserChannelException
IOException
BrowserChannelException
protected static void writeJavaObject(DataOutputStream stream, BrowserChannel.JavaObjectRef value) throws IOException
IOException
protected static void writeJsObject(DataOutputStream stream, BrowserChannel.JsObjectRef value) throws IOException
IOException
protected static void writeNull(DataOutputStream stream) throws IOException
IOException
protected static void writeTaggedBoolean(DataOutputStream stream, boolean value) throws IOException
IOException
protected static void writeTaggedByte(DataOutputStream stream, byte value) throws IOException
IOException
protected static void writeTaggedChar(DataOutputStream stream, char value) throws IOException
IOException
protected static void writeTaggedDouble(DataOutputStream stream, double value) throws IOException
IOException
protected static void writeTaggedInt(DataOutputStream stream, int value) throws IOException
IOException
protected static void writeTaggedShort(DataOutputStream stream, short value) throws IOException
IOException
protected static void writeTaggedString(DataOutputStream stream, String data) throws IOException
IOException
protected static void writeUtf8String(DataOutputStream stream, String data) throws IOException
IOException
public void endSession()
public Set<Integer> getRefIdsForCleanup()
public String getRemoteEndpoint()
protected DataInputStream getStreamFromOtherSide()
protected DataOutputStream getStreamToOtherSide()
protected BrowserChannel.Value readValue(DataInputStream stream) throws IOException
IOException
protected void sendFreedValues() throws IOException
IOException
protected void writeValue(DataOutputStream stream, BrowserChannel.Value value) throws IOException
IOException
Copyright © 2018. All rights reserved.