Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages | Examples

VOS::RemoteSite Class Reference

This class manages a connection to a remote site and the objects bound to that site. More...

#include <vos/corelibs/vos/remotesite.hh>

Inheritance diagram for VOS::RemoteSite:

VOS::Site VOS::RemoteMetaObject VOS::ChildChangeListener VOS::ParentChangeListener VOS::TypeChangeListener VOS::MetaObject VOS::MetaObject VOS::RemoteVobject VOS::Vobject VOS::Vobject VOS::VobjectImplementation VOS::RefCounted VOS::RefCounted VOS::Vobject VOS::ObjectExciseListener VOS::RefCounted VOS::RemoteSocketSite VOS::RemoteStreamSite List of all members.

Public Member Functions

Static Public Member Functions

Protected Member Functions

Protected Attributes

Friends


Detailed Description

This class manages a connection to a remote site and the objects bound to that site.

Definition at line 45 of file remotesite.hh.


Constructor & Destructor Documentation

RemoteSite::RemoteSite  )  [protected]
 

Definition at line 40 of file remotesite.cc.

RemoteSite::~RemoteSite  )  [virtual]
 

Definition at line 47 of file remotesite.cc.


Member Function Documentation

void RemoteSite::addNotification NotifyEvent ev  )  [virtual]
 

Implements VOS::Site.

Definition at line 65 of file remotesite.cc.

void RemoteSite::addRemoteObjectExtension const char *  type,
metaobject_extender_t  newmethod
[static]
 

Definition at line 589 of file remotesite.cc.

void RemoteSite::catchIncomingMessage const string &  nonce  )  [virtual]
 

Save an incoming message -- used by LocalVobject::waitFor.

Definition at line 612 of file remotesite.cc.

void RemoteSite::clearCaughtMessage const string &  nonce  )  [virtual]
 

Stop watching for that nonce.

Definition at line 617 of file remotesite.cc.

MetaObject * RemoteSite::createMetaObject const char *  name,
const deque< string > &  typelist
[virtual]
 

Same as the other createMetaObject method, but takes a deque of type strings rather than a variable list of strings.

See also:
createMetaObject(const char*, const char*, ...)

Implements VOS::Site.

Definition at line 465 of file remotesite.cc.

MetaObject * RemoteSite::createMetaObject const char *  name,
const char *  first,
... 
[virtual]
 

Create a new MetaObject on this site.

Parameters:
name Request this name for the new object. If name is 0, empty or contains a name already in use, a new name will be generated.
type0,... Type strings indicating type extentions to be included with the new objects. The list of type strings must be terminated by a 0.
For example:
           // Create an example object with two types: 3D cube and Hypercard.
           vRef<MetaObject> obj1 = site.createMetaObject("example", "object3D:cube", typeid(Hypercard).name(), 0);

           // Create another example object with no types. Because the same
           // name an the previos object ("example") is specified, this object will be
           // renamed when created, probably to "example1" or something similiar.
           vRef<MetaObject> obj2 = site.createMetaObject("example" , 0);

Implements VOS::Site.

Definition at line 506 of file remotesite.cc.

void RemoteSite::excise  )  [virtual]
 

Note:
Important: this is delegated to the top object, and means you want the entire logical Vobject to go away! If called on an object with no superobject, it calls doExcise() on its type handlers. Type implementation specific cleanup code (such as calling excise on certain children no longer needed) should override doExcise().

Reimplemented from VOS::RemoteMetaObject.

Reimplemented in VOS::RemoteSocketSite.

Definition at line 171 of file remotesite.cc.

Referenced by VOS::RemoteStreamSite::handleDisconnection().

void RemoteSite::extendMetaObject RemoteMetaObject root,
const char *  type
[static]
 

Definition at line 446 of file remotesite.cc.

void RemoteSite::flushIncomingBuffers  )  [pure virtual]
 

Flush any incoming buffers (eg read any data waiting in sockets).

Implements VOS::Site.

Implemented in VOS::RemoteSocketSite, and VOS::RemoteStreamSite.

Definition at line 60 of file remotesite.cc.

void RemoteSite::flushNotifications  )  [virtual]
 

Implements VOS::Site.

Definition at line 70 of file remotesite.cc.

virtual void VOS::RemoteSite::flushOutgoingBuffers const char *  data = 0,
unsigned int  sz = 0
[pure virtual]
 

Implemented in VOS::RemoteSocketSite, and VOS::RemoteStreamSite.

const string& VOS::RemoteSite::getAntiSpoofID  )  [inline]
 

The anti-spoof ID we sent to this site.

Definition at line 159 of file remotesite.hh.

LocalSite & RemoteSite::getLocalPeer  )  throw (NoLocalPeerError) [virtual]
 

Get the local site this remote site is peered with.

Exceptions:
NoLocalPeerError if there is no local peer (which probably means the application has not created a local site yet!)
Returns:
the local site to which this remote site is peered. NOTE YOU MUST CALL release() WHEN DONE OR USE A rREF() BLOCK

Definition at line 53 of file remotesite.cc.

virtual Site& VOS::RemoteSite::getSite  )  [inline, virtual]
 

Get the site this object resides on.

Returns:
the site object. NOTE YOU MUST CALL release() WHEN DONE OR USE A rREF() BLOCK

Reimplemented from VOS::RemoteMetaObject.

Definition at line 88 of file remotesite.hh.

virtual bool VOS::RemoteSite::isConnected  )  [pure virtual]
 

Implements VOS::Site.

Implemented in VOS::RemoteSocketSite, and VOS::RemoteStreamSite.

void RemoteSite::lockChildNotifyOutgoing Vobject v  )  [virtual]
 

Definition at line 206 of file remotesite.cc.

void RemoteSite::lockNotificationFlush  )  [virtual]
 

Implements VOS::Site.

Definition at line 75 of file remotesite.cc.

void RemoteSite::lockParentNotifyOutgoing Vobject v  )  [virtual]
 

Definition at line 245 of file remotesite.cc.

void RemoteSite::lockTypeNotifyOutgoing Vobject v  )  [virtual]
 

Definition at line 273 of file remotesite.cc.

bool RemoteSite::messageInProgress const string &  nonce  )  [virtual]
 

Is a waited-for message still being downloaded?

Definition at line 626 of file remotesite.cc.

bool RemoteSite::messageReady const string &  nonce  )  [virtual]
 

Is a waited-for message ready to be retrieved?

Definition at line 632 of file remotesite.cc.

void RemoteSite::notifyChildInserted VobjectEvent e  )  [virtual]
 

Called when a child has been inserted into the listened-to children list.

Implements VOS::ChildChangeListener.

Definition at line 300 of file remotesite.cc.

void RemoteSite::notifyChildRemoved VobjectEvent e  )  [virtual]
 

Called when a child has been deleted in the listened-to children list.

Implements VOS::ChildChangeListener.

Definition at line 349 of file remotesite.cc.

void RemoteSite::notifyChildReplaced VobjectEvent e  )  [virtual]
 

Called when a child has replaced another child in the listened-to children list.

Implements VOS::ChildChangeListener.

Definition at line 330 of file remotesite.cc.

void RemoteSite::notifyParentInserted VobjectEvent e  )  [virtual]
 

Called when an object has aquired a new parent.

Implements VOS::ParentChangeListener.

Definition at line 368 of file remotesite.cc.

void RemoteSite::notifyParentRemoved VobjectEvent e  )  [virtual]
 

Called when an object has lost a parent.

Implements VOS::ParentChangeListener.

Definition at line 387 of file remotesite.cc.

void RemoteSite::notifyTypeInserted VobjectEvent e  )  [virtual]
 

Called when an object has gained a type.

Implements VOS::TypeChangeListener.

Definition at line 406 of file remotesite.cc.

void RemoteSite::notifyTypeRemoved VobjectEvent e  )  [virtual]
 

Called when an object has lost a type.

Implements VOS::TypeChangeListener.

Definition at line 421 of file remotesite.cc.

void RemoteSite::printExtensionTable ostream &  stream = std::cerr  )  [static]
 

Definition at line 606 of file remotesite.cc.

void RemoteSite::release  )  [virtual]
 

Note that this means you are releasing the entire logical object!

Reimplemented from VOS::RemoteMetaObject.

Definition at line 434 of file remotesite.cc.

Referenced by VOS::AsyncConnect::connect().

void RemoteSite::removeRemoteObjectExtension const char *  type,
metaobject_extender_t  oldmethod
[static]
 

Definition at line 594 of file remotesite.cc.

Message * RemoteSite::retrieveCaughtMessage const string &  nonce  )  [virtual]
 

Get a waited-for message nonce.

You need to call clearCaughtMessage() to stop waiting for that nonce.

Returns:
the message (or possible 0!), note that you should use vRef to release it!

Definition at line 638 of file remotesite.cc.

virtual void VOS::RemoteSite::sendMessage MessageBlock m  )  [pure virtual]
 

Sends a block of messages to the object.

This may trigger immediate processing of the message if the object is local.

Parameters:
m A pointer to the message which is being sent. Its reference count will be increased as necssary.

Reimplemented from VOS::RemoteMetaObject.

Implemented in VOS::RemoteSocketSite, and VOS::RemoteStreamSite.

virtual void VOS::RemoteSite::sendMessage Message m  )  [pure virtual]
 

Sends a message to the object.

This may trigger immediate processing of the message if the object is local.

Parameters:
m A pointer to the message which is being sent. Its reference count will be increased as necssary.

Reimplemented from VOS::RemoteMetaObject.

Implemented in VOS::RemoteSocketSite, and VOS::RemoteStreamSite.

Referenced by createMetaObject(), notifyChildInserted(), notifyChildRemoved(), notifyChildReplaced(), notifyParentInserted(), notifyParentRemoved(), notifyTypeInserted(), notifyTypeRemoved(), unlockChildNotifyOutgoing(), unlockParentNotifyOutgoing(), and unlockTypeNotifyOutgoing().

void RemoteSite::sendUpdateMessage Message m  )  [virtual]
 

Gets the next message the update object has received.

Update messages are special in that they consist of messages sent from remote sites to update changes to our local cache.

Parameters:
m A pointer to the message which is being sent. Its reference count will be increased as necssary.

Reimplemented from VOS::RemoteMetaObject.

Definition at line 85 of file remotesite.cc.

void VOS::RemoteSite::setAntiSpoofID const string &  s  )  [inline]
 

The anti-spoof ID we sent to this site.

Definition at line 156 of file remotesite.hh.

void RemoteSite::setChild int  position,
const string &  contextual_name,
Vobject child
throw (AccessControlError, TimeoutError) [virtual]
 

Note:
supplying a NULL for child means release child object but do not delete parent-child relation...

Reimplemented from VOS::RemoteMetaObject.

Definition at line 153 of file remotesite.cc.

Referenced by sendUpdateMessage().

void RemoteSite::setURL const URL u  )  [virtual]
 

Set the base URL ("vop://host:port") that this site will use.

Parameters:
u some URL.

Implements VOS::Site.

Definition at line 166 of file remotesite.cc.

void RemoteSite::unlockChildNotifyOutgoing Vobject v,
const string &  nonce
[virtual]
 

Definition at line 211 of file remotesite.cc.

void RemoteSite::unlockNotificationFlush  )  [virtual]
 

Implements VOS::Site.

Definition at line 80 of file remotesite.cc.

void RemoteSite::unlockParentNotifyOutgoing Vobject v,
const string &  nonce
[virtual]
 

Definition at line 250 of file remotesite.cc.

void RemoteSite::unlockTypeNotifyOutgoing Vobject v,
const string &  nonce
[virtual]
 

Definition at line 278 of file remotesite.cc.


Friends And Related Function Documentation

void Site::doSitePeering LocalSite localsite,
RemoteSite remotesite,
bool  isspooftest,
bool  waitforhello
[friend]
 


Member Data Documentation

set<Vobject*> VOS::RemoteSite::childlockSet [protected]
 

Definition at line 66 of file remotesite.hh.

Referenced by lockChildNotifyOutgoing(), notifyChildInserted(), notifyChildRemoved(), notifyChildReplaced(), and unlockChildNotifyOutgoing().

bool VOS::RemoteSite::disconnected [protected]
 

Definition at line 65 of file remotesite.hh.

Referenced by excise().

LocalSite* VOS::RemoteSite::localpeer [protected]
 

Definition at line 64 of file remotesite.hh.

Referenced by addNotification(), excise(), VOS::RemoteStreamSite::flushIncomingBuffers(), VOS::RemoteSocketSite::flushIncomingBuffers(), flushIncomingBuffers(), flushNotifications(), VOS::RemoteSocketSite::flushOutgoingBuffers(), lockNotificationFlush(), VOS::RemoteSocketSite::secureConnection(), unlockNotificationFlush(), and ~RemoteSite().

set<Vobject*> VOS::RemoteSite::parentlockSet [protected]
 

Definition at line 67 of file remotesite.hh.

Referenced by lockParentNotifyOutgoing(), notifyParentInserted(), notifyParentRemoved(), and unlockParentNotifyOutgoing().

set<Vobject*> VOS::RemoteSite::typelockSet [protected]
 

Definition at line 68 of file remotesite.hh.

Referenced by lockTypeNotifyOutgoing(), notifyTypeInserted(), and unlockTypeNotifyOutgoing().

map<string, pair<bool, Message*> > VOS::RemoteSite::waitingFor [protected]
 

Definition at line 69 of file remotesite.hh.

Referenced by catchIncomingMessage(), clearCaughtMessage(), VOS::RemoteSocketSite::flushIncomingBuffers(), messageInProgress(), messageReady(), and retrieveCaughtMessage().


The documentation for this class was generated from the following files:
Generated on Tue Aug 12 03:56:06 2003 for Interreality Project - VOS by doxygen 1.3.2