Difference between revisions of "IComponentSystem"
From Virtual World Web Wiki
(Documentation for the IComponentSystem class) |
(Documentation for the IComponentSystem class) |
||
(10 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
===Remarks <nowiki>[</nowiki>[{{fullurl:IComponentSystem Remarks|action=edit}} edit]<nowiki>]</nowiki>=== | ===Remarks <nowiki>[</nowiki>[{{fullurl:IComponentSystem Remarks|action=edit}} edit]<nowiki>]</nowiki>=== | ||
− | {{:IComponentSystem Remarks}} | + | {{#ifexist:IComponentSystem Remarks|{{:IComponentSystem Remarks}}|}} |
===Properties=== | ===Properties=== | ||
Line 9: | Line 9: | ||
::Gets or sets the database connection string for your component | ::Gets or sets the database connection string for your component | ||
− | + | :{{CSharp|ComponentHostType HostType {get;} }} | |
− | :{{CSharp| | + | :: |
+ | ::Gets the runtime environment in which this component instance is running | ||
− | :{{CSharp|void ChangeNotify(string selector, Guid? id)}} | + | :{{CSharp|SerializationBinder SerializationBinder {get;} }} |
+ | :: | ||
+ | ::Provides a serialization binder that can handle assembly version differences | ||
+ | |||
+ | ===Methods=== | ||
+ | :{{CSharp|void ChangeNotify(string selector, Guid? id {{=}} NULL)}} | ||
:: | :: | ||
::Notifies all systems on the service provider network of a change that may require chache clears | ::Notifies all systems on the service provider network of a change that may require chache clears | ||
+ | |||
+ | :{{CSharp|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. | ||
+ | |||
+ | :{{CSharp|ValueTuple<int, long, string> CheckTransferStatus(Guid inboundTransferID)}} | ||
+ | :: | ||
+ | ::Used by remote servers to check the status of an ongoing transfer package import | ||
:{{CSharp|void ClearRootCookie(IConnectionIdentity identity)}} | :{{CSharp|void ClearRootCookie(IConnectionIdentity identity)}} | ||
Line 23: | Line 37: | ||
:: | :: | ||
::Clears a cookie previously stored on root for the given user by the requesting component | ::Clears a cookie previously stored on root for the given user by the requesting component | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
:{{CSharp|Guid CreateClientScriptOverlay(Guid clientScriptID, Guid resourceItemID, string title)}} | :{{CSharp|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 | ::Creates a new overlay package for a client script. This package contains files that override the files in the main client script package resource | ||
− | |||
− | |||
− | |||
− | |||
:{{CSharp|void DeleteClientScript(Guid clientScriptID)}} | :{{CSharp|void DeleteClientScript(Guid clientScriptID)}} | ||
Line 50: | Line 54: | ||
::Deletes all client scripts owned by your component (and unlinks them from all securables) | ::Deletes all client scripts owned by your component (and unlinks them from all securables) | ||
− | :{{CSharp|void | + | :{{CSharp|void DeleteScriptLibrary(Guid scriptLibraryID)}} |
:: | :: | ||
− | :: | + | ::Deletes a script library |
+ | |||
+ | :{{CSharp|void DisableComponent(Guid componentID)}} | ||
+ | :: | ||
+ | ::Disables an installed component. | ||
+ | |||
+ | :{{CSharp|void EnableComponent(Guid componentID)}} | ||
+ | :: | ||
+ | ::Enables an installed component. | ||
:{{CSharp|bool ExportTransferPackage(Guid transferPackageID)}} | :{{CSharp|bool ExportTransferPackage(Guid transferPackageID)}} | ||
Line 58: | Line 70: | ||
::Writes all objects specified by a transfer package to a file | ::Writes all objects specified by a transfer package to a file | ||
− | :{{CSharp|void FireSystemEvent(string identifier, Guid? context, Decimal? amount)}} | + | :{{CSharp|void FireSystemEvent(string identifier, Guid? context {{=}} NULL, Decimal? amount {{=}} NULL)}} |
:: | :: | ||
::Notifies the service provider of a named system event. Layer 2 is notified | ::Notifies the service provider of a named system event. Layer 2 is notified | ||
Line 91: | Line 103: | ||
:{{CSharp|IInstanceContext GetScriptInstanceContext()}} | :{{CSharp|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. |
:{{CSharp|string GetTransferPackageURL(Guid transferPackageID)}} | :{{CSharp|string GetTransferPackageURL(Guid transferPackageID)}} | ||
Line 108: | Line 118: | ||
::Tests whether a given component is installed on the system | ::Tests whether a given component is installed on the system | ||
− | :{{CSharp|IChannelHandle JoinChannel(string channelName)}} | + | :{{CSharp|IChannelHandle JoinChannel(string channelName, bool receiveOwn {{=}} false)}} |
:: | :: | ||
::Subscribes your component to a named message channel | ::Subscribes your component to a named message channel | ||
− | :{{CSharp|Guid LinkClientScript(Guid clientScriptID, Guid securableID, string metadata)}} | + | :{{CSharp|Guid LinkClientScript(Guid clientScriptID, Guid securableID, string metadata {{=}} NULL, bool autoSend {{=}} false)}} |
:: | :: | ||
::Link a client script to a securable (worldspace or entity) | ::Link a client script to a securable (worldspace or entity) | ||
− | :{{CSharp| | + | :{{CSharp|void LinkScriptLibrary(Guid clientScriptID, Guid scriptLibraryID)}} |
:: | :: | ||
− | :: | + | ::Links a Script Library to a Client Script |
− | + | :{{CSharp|void LogActivity(Guid accountID, string identifier, string detail, Guid? securableID, Guid? contextID, Guid? componentID {{=}} NULL)}} | |
− | + | ||
− | + | ||
− | + | ||
− | :{{CSharp|void LogActivity(Guid accountID, string identifier, string detail, Guid? securableID, Guid? contextID, Guid? componentID)}} | + | |
:: | :: | ||
::Logs an event to the admin activity log | ::Logs an event to the admin activity log | ||
− | :{{CSharp|Guid RegisterClientScript(Guid resourceItemID, string identifier, string description, string metadata, bool | + | :{{CSharp|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 | ::Registers a client script with L1 which can later be delivered to a connection and interacted with via script messages | ||
− | :{{CSharp|void RegisterExtensionFactory<TExtendable, TExtension>(Func<TExtendable, TExtension> createFunc, bool autoCreate)}} | + | :{{CSharp|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 | ::Registers a factory method for creating instances of extension objects to be associated with core L1 objects like IViewInfo, IConnectionIdentity, or IParticipant | ||
− | :{{CSharp|void SendOnChannel(string channelName, object message)}} | + | :{{CSharp|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 | ||
+ | |||
+ | :{{CSharp|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) | ::Sends a message (which will be JSON formatted) on a named channel without necesarily being subscribed (joined) | ||
− | |||
− | |||
:{{CSharp|void SetClientScriptLinkMetadata(Guid clientScriptLinkID, string metadata)}} | :{{CSharp|void SetClientScriptLinkMetadata(Guid clientScriptLinkID, string metadata)}} | ||
Line 150: | Line 158: | ||
::Sets the metadata on a client script link given the ID's of the link's client script and securable | ::Sets the metadata on a client script link given the ID's of the link's client script and securable | ||
− | :{{CSharp|Guid StartTransfer( | + | :{{CSharp|void SetScriptLibraries(Guid clientScriptID, Guid[] scriptLibraryIDs)}} |
+ | :: | ||
+ | ::Changes the set of Script Libraries that are linked to a Client Script | ||
+ | |||
+ | :{{CSharp|Guid StartTransfer(string uri, long fileSize)}} | ||
+ | :: | ||
+ | ::Used by remote servers to initiate a remote package transfer | ||
:{{CSharp|void StoreRootCookie(IConnectionIdentity identity, string jsonData)}} | :{{CSharp|void StoreRootCookie(IConnectionIdentity identity, string jsonData)}} | ||
Line 161: | Line 175: | ||
:{{CSharp|Guid TransferToLinkedServer(Guid linkedServerID, Guid transferPackageID)}} | :{{CSharp|Guid TransferToLinkedServer(Guid linkedServerID, Guid transferPackageID)}} | ||
+ | :: | ||
+ | ::Transfers a package to the requested linked server | ||
:{{CSharp|Guid TransferToLinkedServer(Guid linkedServerID, TransferItemType itemType, Guid itemID)}} | :{{CSharp|Guid TransferToLinkedServer(Guid linkedServerID, TransferItemType itemType, Guid itemID)}} | ||
+ | :: | ||
+ | ::Transfers a specific L1 item to the requested linked server | ||
+ | |||
+ | :{{CSharp|Guid TransferToLinkedServer(Guid linkedServerID, string objectClass, Guid objectID)}} | ||
+ | :: | ||
+ | ::Transfers an component object to the requested linked server | ||
:{{CSharp|void UnlinkClientScript(Guid clientScriptID, Guid securableID)}} | :{{CSharp|void UnlinkClientScript(Guid clientScriptID, Guid securableID)}} | ||
Line 172: | Line 194: | ||
::Unlinks a client script from all securables | ::Unlinks a client script from all securables | ||
− | :{{CSharp|Guid UpdateClientScript(Guid clientScriptID, string identifier, string description, string metadata, bool | + | :{{CSharp|void UnLinkScriptLibrary(Guid clientScriptID, Guid scriptLibraryID)}} |
+ | :: | ||
+ | ::Un-Links a Script Library from a Client Script | ||
+ | |||
+ | :{{CSharp|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 | ::Updates teh definition of a client script | ||
__NOTOC____NOEDITSECTION__ | __NOTOC____NOEDITSECTION__ |
Latest revision as of 17:17, 19 November 2018
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