IComponentSystem

From Virtual World Web Wiki
Jump to: navigation, search

The component system is a primary layer one interface. It contains many useful utility methods for managing the component's lifetime, communicating with other components, communicating with root, and using the server transfer package system.

Remarks [edit]

Properties

string DatabaseConnectionString {get;}
Gets or sets the database connection string for your component
ComponentHostType HostType {get;}
Gets the runtime environment in which this component instance is running
SerializationBinder SerializationBinder {get;}
Provides a serialization binder that can handle assembly version differences

Methods

void ChangeNotify(string selector, Guid? id = NULL)
Notifies all systems on the service provider network of a change that may require chache clears
void CheckComponent(Guid componentID)
Sends a health check request signal to the installed component. Behavior is component defined. This provides a mechanism for manual reinstall or integrity checks.
ValueTuple<int, long, string> CheckTransferStatus(Guid inboundTransferID)
Used by remote servers to check the status of an ongoing transfer package import
void ClearRootCookie(IConnectionIdentity identity)
Clears a cookie previously stored on root for the given user by the requesting component
void ClearRootCookie(Guid accountID)
Clears a cookie previously stored on root for the given user by the requesting component
Guid CreateClientScriptOverlay(Guid clientScriptID, Guid resourceItemID, string title)
Creates a new overlay package for a client script. This package contains files that override the files in the main client script package resource
void DeleteClientScript(Guid clientScriptID)
Deletes a client script (and unlinks it from all securables)
void DeleteClientScriptOverlay(Guid clientScriptOverlayID)
Deletes a client script overlay package
void DeleteClientScripts()
Deletes all client scripts owned by your component (and unlinks them from all securables)
void DeleteScriptLibrary(Guid scriptLibraryID)
Deletes a script library
void DisableComponent(Guid componentID)
Disables an installed component.
void EnableComponent(Guid componentID)
Enables an installed component.
bool ExportTransferPackage(Guid transferPackageID)
Writes all objects specified by a transfer package to a file
void FireSystemEvent(string identifier, Guid? context = NULL, Decimal? amount = NULL)
Notifies the service provider of a named system event. Layer 2 is notified
IComponentInfo GetComponentInfo(Guid componentID)
Gets information about an installed component
IEnumerable<IComponentInfo> GetComponentInfos()
Gets information about all components installed on the system
ILinkedServerInfo GetLinkedServer(Guid linkedServerID)
Gets information about a specific linked server
ILinkedServerInfo[] GetLinkedServers()
Gets information about all of the linked servers defined on this system
ILinkedServerInfo[] GetLinkedServers(Guid accountID)
Gets information about all of the linked servers defined as public or belonging to the specified account
string GetRootCookie(IConnectionIdentity identity)
Gets a cookie previously stored on root for the given user by the requesting component
string GetRootCookie(Guid accountID)
Gets a cookie previously stored on root for the given user by the requesting component
IInstanceContext GetScriptInstanceContext()
Can be used from component code that is running in a Javascript context to get the current IInstanceContext. You would use this if your component is providing a javascript global, or extending a system javascript type. Then on a method call, this API would be valid.
string GetTransferPackageURL(Guid transferPackageID)
Gets the web server URL where an exported transfer package will appear
bool ImportTransferPackage(Byte[] packageData)
Injects the items in this transfer package into the system
bool IsComponentInstalled(Guid componentID)
Tests whether a given component is installed on the system
IChannelHandle JoinChannel(string channelName, bool receiveOwn = false)
Subscribes your component to a named message channel
Guid LinkClientScript(Guid clientScriptID, Guid securableID, string metadata = NULL, bool autoSend = false)
Link a client script to a securable (worldspace or entity)
void LinkScriptLibrary(Guid clientScriptID, Guid scriptLibraryID)
Links a Script Library to a Client Script
void LogActivity(Guid accountID, string identifier, string detail, Guid? securableID, Guid? contextID, Guid? componentID = NULL)
Logs an event to the admin activity log
Guid RegisterClientScript(Guid resourceItemID, string identifier, string description = NULL, string metadata = NULL, bool pauseNavigate = false, string identifierPrefix = NULL)
Registers a client script with L1 which can later be delivered to a connection and interacted with via script messages
void RegisterExtensionFactory<TExtendable, TExtension>(Func<TExtendable, TExtension> createFunc, bool autoCreate = false)
Registers a factory method for creating instances of extension objects to be associated with core L1 objects like IViewInfo, IConnectionIdentity, or IParticipant
Guid RegisterScriptLibrary(Guid resourceItemID, string identifier, string description = NULL)
Registers a shared script library with L1 which can be associated with client scripts or DOMScript nodes and included in their script context at runtime
void SendOnChannel(string channelName, object message, Guid? securableID = NULL)
Sends a message (which will be JSON formatted) on a named channel without necesarily being subscribed (joined)
void SetClientScriptLinkMetadata(Guid clientScriptLinkID, string metadata)
Sets the metadata on a client script link given it's ID
void SetClientScriptLinkMetadata(Guid clientScriptID, Guid securableID, string metadata)
Sets the metadata on a client script link given the ID's of the link's client script and securable
void SetScriptLibraries(Guid clientScriptID, Guid[] scriptLibraryIDs)
Changes the set of Script Libraries that are linked to a Client Script
Guid StartTransfer(string uri, long fileSize)
Used by remote servers to initiate a remote package transfer
void StoreRootCookie(IConnectionIdentity identity, string jsonData)
Stores a cookie on root for the given user for the requesting component
void StoreRootCookie(Guid accountID, string jsonData)
Stores a cookie on root for the given user for the requesting component
Guid TransferToLinkedServer(Guid linkedServerID, Guid transferPackageID)
Transfers a package to the requested linked server
Guid TransferToLinkedServer(Guid linkedServerID, TransferItemType itemType, Guid itemID)
Transfers a specific L1 item to the requested linked server
Guid TransferToLinkedServer(Guid linkedServerID, string objectClass, Guid objectID)
Transfers an component object to the requested linked server
void UnlinkClientScript(Guid clientScriptID, Guid securableID)
Unlinks a cleint script from a securable (worldspace or entity)
void UnlinkClientScript(Guid clientScriptID)
Unlinks a client script from all securables
void UnLinkScriptLibrary(Guid clientScriptID, Guid scriptLibraryID)
Un-Links a Script Library from a Client Script
Guid UpdateClientScript(Guid clientScriptID, string identifier, string description = NULL, string metadata = NULL, bool pauseNavigate = false, string identifierPrefix = NULL)
Updates teh definition of a client script