File too/Connection


class too.Connection

Inherits

State supers
tom.State, DescriptorReadDelegate, tom.Constants

variables

static tom.MutableEqSet all_connections;
All connection objects.

methods

instance (id)
  alloc;
Store the new connection in the all_connections.

void
       connection Connection connection
  remoteProxyDead int identity
pre
  !!all_connections[connection];
Pass this message to the connection.

instance too.Connection

variables

public _builtin_.Any root;
The root object of this connection.
public Port port;
The Port serving this connection.
tom.MutableEqDictionary local_objects;
The set of local proxies, keyed on their local object.
tom.MutableIntDictionary local_proxies;
The set of local proxies, keyed on their identity.
tom.MutableIntDictionary remote_proxies;
The set of remote proxies, keyed on their identity.
tom.MutableIntArray unreported_deaths;
The set of remote proxy identities that are dead here and which need to be sent to the other side.
int last_proxy_ident;
The last number used as a local proxy identity.

methods

id (self)
  initWithPort Port p;
Designated initializer.

protected tom.IntDictionary
  local_proxies;
Other connections may inspect our proxies.

_builtin_.Any (object)
  localObject int identity
post
  object != nil;
Return the local object identified by the identity to the other side.

Proxy
  localProxyFor tom.All object
pre
  object != nil;
Return the local proxy to identify the local object.

_builtin_.Any
  remoteObject int identity;
Return the remote object identified by the identity by the other side.

Distributed Garbage Collection

void
  localProxyRelease int identity
pre
  !!local_proxies[identity];
Be informed that the local proxy with the identity has one less remote proxy to care for. If that number reaches zero, the local proxy object is removed.

void
  remoteProxyDead int identity;
By informed (by our remote proxy with the identity) of the GC death of a remote proxy.

Note that this method is invoked during GC and that no new objects should be allocated.


class too.ServerConnection

Inherits

State supers
Connection

instance too.ServerConnection

variables

redeclare ServerPort port;
Our port is only here for accepting connections.

methods

id (self)
  initWithPort ServerPort p;
Designated initializer.

void
  set_root tom.All r;
Undocumented.

void
  readEventOnDescriptor ServerInetPort p;
Instantiate another ConnectedConnection.


class too.ConnectedConnection

Inherits

State supers
Connection, DescriptorWriteDelegate, tom.Conditions

instance too.ConnectedConnection

variables

redeclare ConnectedPort port;
We are actually connected.
PortDecoder decoder;
Our decoder.
PortEncoder encoder;
Our encoder.
ServerConnection master;
If we're a slave connection (i.e. the working part for a published connection), this is the published server connection.
boolean invalid;
Iff TRUE, we've lost the connection.

methods

id (self)
  initWithPort ConnectedPort p;
Initializer for a client connection.

id (self)
  initWithPort ConnectedPort p
           for ServerConnection server;
Initializer for a slave connection, i.e. a slave to the server connection.

protected void
  initDetails;
Do part of the work for either initializer.

void
  invalidate;
Undocumented.

ConnectedPort
  port;
Undocumented.

_builtin_.Any
  localObject int identity;
Forward to the master if we have one.

Proxy
  localProxyFor tom.All object;
Forward to the master if we have one.

void
  localProxyRelease int identity
pre
  !!master -> !![master local_proxies][identity];
Forward to the master if we have one.

tom.InvocationResult
  forward tom.Invocation invocation;
Forward the invocation to the other side.

void
  readEventOnDescriptor ConnectedInetPort p;
Undocumented.


Generated by tm 1.01.