Table of Contents

OIL2 Class Standard.PeerConnection


class Standard . PeerConnection {
        set     cleanupObjects;
        array   decryptCipher;
        array   encryptCipher;
        int32   messagesReceived;
        int32   messagesSent;
        int32   negotiatedEncodingVersion;
        oid     notifyOnDelete;
        oid     readBfr;
        oid     remoteObjectCreator;
        oid     remotePeerConnection;
        oid     sendObj;
        int32   valid;
inherits from Object;

DESCRIPTION

The class PeerConnection implements a gateway between the local process and a remote FARGOS/VISTA peer. Objects of this class are created as needed by NegotiatePeerConnection objects after the successful negotiation of a session key and initialization of the outgoing encryption and incoming decryption ciphers.

METHODS


Standard.PeerConnection:canRead

PeerConnection:canRead()

Method Description

The PeerConnection object issues selectForRead requests to the IOobject (or allomorphic equivalent) that represents the link to the remote peer. As a result, the canRead method is invoked whenever a message has been sent by the remote peer. For additional security, any arguments to this method are ignored and readBytes requests are issued only to the IOobject that was specified at the time the object was initialized.


Standard.PeerConnection:createTemporaryObject

PeerConnection:createTemporaryObject(any className, optional assoc acl, optional any arg1, optional any arg2)

Method Description

Sometimes peer-connected applications create objects within the local environment that would be useless if the connection to the application is terminated. The createTemporaryObject method is used to create local objects that will be automatically deleted if the peer connection is lost.


Standard.PeerConnection:forwardMethodInvocation

PeerConnection:forwardMethodInvocation(any destObj, string methodName, array args, any fromObj)

Method Description

Applications do not use the forwardMethodInvocation method directly. It is automatically invoked by the FARGOS/VISTA Object Management Environment core whenever a method invocation is made to an object that is on a remote system. The PeerConnection gateway object is really treated by the core as a meta-object for any references to object located on the remote peer. For this reason, forwardMethodInvocation has the same prototype as any meta object handler (see Object:setMeta or ObjectCreator:setClassMetaObject).

destObj
specifies the object ID/well-known-name of the remote object
methodName
specifies the name of the method to be invoked
args
the argv array of arguments for the method invocation
fromObj
specifies the value of fromObject for this method invocation