Table of Contents
ASSETSERVICE
The Asset Service replaces the legacy standalone Asset Server executable.
CONFIGURATION ITEMS
[AssetService] Configuration Item | Default | Example | Description |
---|---|---|---|
AssetLoaderArgs | Empty String | assets/AssetSets.xml | configure options for DefaultAssetLoader |
AssetLoaderEnabled | true | true | Should the Asset Loader be used? |
AllowRemoteDelete | |||
AllowRemoteDeleteAllTypes | |||
AssetServerURI | |||
ConnectionString | |||
DefaultAssetLoader | |||
LocalServiceModule | |||
StorageProvider |
AssetLoaderArgs
The configuration for the DLL loaded by DefaultAssetLoader.
This points to the filename which holds the default asset library folders available to viewers when connected.
These are configured as “Asset Sets” which map to the folders in inventory, and point to the files which contain a list of the specific assets in the folder.
Defaults to an empty string.
AssetLoaderEnabled
Should the Asset Loader be used?
Defaults to true.
RELATED CONFIGURATION ITEMS
The following items are configured in [AssetService] configuration blocks, they are not read or used by the actual AssetService core module.
AllowRemoteDelete
Allow maptile assets to remotely deleted by remote calls to the asset service.
There is no harm in having this as false - it just means that historical maptile assets are not deleted.
This only applies to maptiles served via the version 1 viewer mechanisms.
Default is false.
AllowRemoteDeleteAllTypes
Allow all assets to be remotely deleted.
Only set this to true if you are operating a grid where you control all calls to the asset service (where a necessary condition is that you control all simulators) and you need this for admin purposes.
If set to true, AllowRemoteDelete = true is required as well.
Default is false.
AssetServerURI
Change this to your grid-wide asset server.
Do not add a slash to the end of any of these addresses.
ConnectionString
Which database connection string is used to load assets when *not* using a [DatabaseService] configuration.
Brought in from the AssetServiceBase
DefaultAssetLoader
The name of the DLL to load to load the default assets available to viewers when connected.
Brought in from the AssetServiceBase class.
LocalServiceMondule
The name of the DLL to load to provide this service, followed by a colon ':' followed by the class to initialize in the DLL.
Default DLL is OpenSim.Services.AssetService.dll
Default class in that DLL is AssetService
StorageProvider
Which database DLL is used to load assets when *not* using a [DatabaseService] configuration.
Brought in from the AssetServiceBase class
CONFIGURATION FILES
OpenSim/bin/config-include/GridCommon.ini - for grid-connected regions
OpenSim/bin/config-include/StandAloneCommon.ini - for standlone regions
OpenSim/bin/OpenSimDefaults.ini - the default OpenSim settings
OpenSim/bin/Robust.ini - for a closed grid without hypergrid enabled
OpenSim/bin/Robust.HG.ini - for open grid with hypergrid enabled
GridCommon.ini Example
[AssetService] DefaultAssetLoader = "OpenSim.Framework.AssetLoader.Filesystem.dll" AssetLoaderArgs = "assets/AssetSets.xml" ;; Change this to your grid-wide asset server. ;; Do not add a slash to the end of any of these addresses. AssetServerURI = "http://mygridserver.com:8003"
StandaloneCommon.ini Example
[AssetService] DefaultAssetLoader = "OpenSim.Framework.AssetLoader.Filesystem.dll" AssetLoaderArgs = "assets/AssetSets.xml"
OpenSimDefaults.ini
;; ;; These are defaults that are overwritten below in [Architecture]. ;; These defaults allow OpenSim to work out of the box with ;; zero configuration ;; [AssetService] DefaultAssetLoader = "OpenSim.Framework.AssetLoader.Filesystem.dll" AssetLoaderArgs = "assets/AssetSets.xml" ; Disable this to prevent the default asset set from being inserted into the ; asset store each time the region starts AssetLoaderEnabled = true
Robust.ini Example
; * As an example, the below configuration precisely mimicks the legacy ; * asset server. It is read by the asset IN connector (defined above) ; * and it then loads the OUT connector (a local database module). That, ; * in turn, reads the asset loader and database connection information ; * [AssetService] LocalServiceModule = "OpenSim.Services.AssetService.dll:AssetService" DefaultAssetLoader = "OpenSim.Framework.AssetLoader.Filesystem.dll" AssetLoaderArgs = "./assets/AssetSets.xml" ; Allow maptile assets to remotely deleted by remote calls to the asset service. ; There is no harm in having this as false - it just means that historical maptile assets are not deleted. ; This only applies to maptiles served via the version 1 viewer mechanisms ; Default is false AllowRemoteDelete = false ; Allow all assets to be remotely deleted. ; Only set this to true if you are operating a grid where you control all calls to the asset service ; (where a necessary condition is that you control all simulators) and you need this for admin purposes. ; If set to true, AllowRemoteDelete = true is required as well. ; Default is false. AllowRemoteDeleteAllTypes = false
Robust.HG.ini Example
; * As an example, the below configuration precisely mimicks the legacy ; * asset server. It is read by the asset IN connector (defined above) ; * and it then loads the OUT connector (a local database module). That, ; * in turn, reads the asset loader and database connection information ; * [AssetService] LocalServiceModule = "OpenSim.Services.AssetService.dll:AssetService" DefaultAssetLoader = "OpenSim.Framework.AssetLoader.Filesystem.dll" AssetLoaderArgs = "./assets/AssetSets.xml"
FUNCTIONS
- AssetService ( IConfigSource config )
- AssetService ( IConfigSource config, string configName )
- Get ( string ID ), returns AssetBase
- GetCached ( string ID ), returns AssetBase
- GetMetadata ( string ID ), returns AssetMetadata
- GetData ( string ID ), returns byte array
- Get ( string ID, Object sender, AssetRetrieved handler ), returns boolean
- Store ( AssetBase asset ), returns string
- UpdateContent ( string id, byte[] data ), returns boolean, always false NOT IMPLEMENTED
- Delete ( string id ), returns boolean
SEE ALSO
AssetBase
AssetMetadata
AssetRetrieved
AssetServiceBase
AssetServiceConnector
IAssetService
IConfigService
Last Updated: r/22287 2013-03-07