OpenSim
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Public Member Functions | Properties | List of all members
OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset.HGAssetBroker Class Reference
Inheritance diagram for OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset.HGAssetBroker:
Inheritance graph
[legend]
Collaboration diagram for OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset.HGAssetBroker:
Collaboration graph
[legend]

Public Member Functions

 HGAssetBroker ()
 
 HGAssetBroker (IConfigSource config)
 
void Initialise (IConfigSource source)
 This is called to initialize the region module. For shared modules, this is called exactly once, after creating the single (shared) instance. For non-shared modules, this is called once on each instance, after the instace for the region has been created. More...
 
void PostInitialise ()
 This is called exactly once after all the shared region-modules have been instanciated and IRegionModuleBase.Initialised. More...
 
void Close ()
 This is the inverse to Initialise. After a Close(), this instance won't be usable anymore. More...
 
void AddRegion (Scene scene)
 This is called whenever a Scene is added. For shared modules, this can happen several times. For non-shared modules, this happens exactly once, after Initialise has been called. More...
 
void RemoveRegion (Scene scene)
 This is called whenever a Scene is removed. For shared modules, this can happen several times. For non-shared modules, this happens exactly once, if the scene this instance is associated with is removed. More...
 
void RegionLoaded (Scene scene)
 This will be called once for every scene loaded. In a shared module this will be multiple times in one instance, while a nonshared module instance will only be called once. This method is called after AddRegion has been called in all modules for that scene, providing an opportunity to request another module's interface, or hook an event from another module. More...
 
AssetBase Get (string id)
 Get an asset synchronously. More...
 
AssetBase GetCached (string id)
 Synchronously fetches an asset from the local cache only. More...
 
AssetMetadata GetMetadata (string id)
 Get an asset's metadata More...
 
byte[] GetData (string id)
 Get an asset's data, ignoring the metadata. More...
 
bool Get (string id, Object sender, AssetRetrieved handler)
 Get an asset synchronously or asynchronously (depending on whether it is locally cached) and fire a callback with the fetched asset More...
 
virtual bool[] AssetsExist (string[] ids)
 Check if assets exist in the database. More...
 
string Store (AssetBase asset)
 Creates a new asset More...
 
bool UpdateContent (string id, byte[] data)
 Update an asset's content More...
 
bool Delete (string id)
 Delete an asset More...
 

Properties

Type ReplaceableInterface [get]
 
string Name [get]
 
- Properties inherited from OpenSim.Region.Framework.Interfaces.IRegionModuleBase
string Name [get]
 
Type ReplaceableInterface [get]
 If this returns non-null, it is the type of an interface that this module intends to register. This will cause the loader to defer loading of this module until all other modules have been loaded. If no other module has registered the interface by then, this module will be activated, else it will remain inactive, letting the other module take over. This should return non-null ONLY in modules that are intended to be easily replaceable, e.g. stub implementations that the developer expects to be replaced by third party provided modules. More...
 

Detailed Description

Definition at line 45 of file HGAssetBroker.cs.

Constructor & Destructor Documentation

OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset.HGAssetBroker.HGAssetBroker ( )
inline

Definition at line 72 of file HGAssetBroker.cs.

OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset.HGAssetBroker.HGAssetBroker ( IConfigSource  config)
inline

Definition at line 74 of file HGAssetBroker.cs.

Member Function Documentation

void OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset.HGAssetBroker.AddRegion ( Scene  scene)
inline

This is called whenever a Scene is added. For shared modules, this can happen several times. For non-shared modules, this happens exactly once, after Initialise has been called.

Parameters
sceneA Scene

Implements OpenSim.Region.Framework.Interfaces.IRegionModuleBase.

Definition at line 158 of file HGAssetBroker.cs.

virtual bool [] OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset.HGAssetBroker.AssetsExist ( string[]  ids)
inlinevirtual

Check if assets exist in the database.

Parameters
idsThe assets' IDs
Returns
For each asset: true if it exists, false otherwise

Implements OpenSim.Services.Interfaces.IAssetService.

Definition at line 323 of file HGAssetBroker.cs.

void OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset.HGAssetBroker.Close ( )
inline

This is the inverse to Initialise. After a Close(), this instance won't be usable anymore.

Implements OpenSim.Region.Framework.Interfaces.IRegionModuleBase.

Definition at line 154 of file HGAssetBroker.cs.

bool OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset.HGAssetBroker.Delete ( string  id)
inline

Delete an asset

Parameters
id
Returns

Implements OpenSim.Services.Interfaces.IAssetService.

Definition at line 397 of file HGAssetBroker.cs.

AssetBase OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset.HGAssetBroker.Get ( string  id)
inline

Get an asset synchronously.

Parameters
id
Returns

Implements OpenSim.Services.Interfaces.IAssetService.

Definition at line 205 of file HGAssetBroker.cs.

bool OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset.HGAssetBroker.Get ( string  id,
Object  sender,
AssetRetrieved  handler 
)
inline

Get an asset synchronously or asynchronously (depending on whether it is locally cached) and fire a callback with the fetched asset

Parameters
idThe asset id
senderRepresents the requester. Passed back via the handler
handlerThe handler to call back once the asset has been retrieved. This will be called back with a null AssetBase if the asset could not be found for some reason (e.g. if it does not exist, if a remote asset service was not contactable, if it is not in the database, etc.).
Returns
True if the id was parseable, false otherwise

Implements OpenSim.Services.Interfaces.IAssetService.

Definition at line 290 of file HGAssetBroker.cs.

AssetBase OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset.HGAssetBroker.GetCached ( string  id)
inline

Synchronously fetches an asset from the local cache only.

Parameters
idAsset ID
Returns
The fetched asset, or null if it did not exist in the local cache

Implements OpenSim.Services.Interfaces.IAssetService.

Definition at line 239 of file HGAssetBroker.cs.

byte [] OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset.HGAssetBroker.GetData ( string  id)
inline

Get an asset's data, ignoring the metadata.

Parameters
id
Returns
null if there is no such asset

Implements OpenSim.Services.Interfaces.IAssetService.

Definition at line 270 of file HGAssetBroker.cs.

AssetMetadata OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset.HGAssetBroker.GetMetadata ( string  id)
inline

Get an asset's metadata

Parameters
id
Returns

Implements OpenSim.Services.Interfaces.IAssetService.

Definition at line 247 of file HGAssetBroker.cs.

void OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset.HGAssetBroker.Initialise ( IConfigSource  source)
inline

This is called to initialize the region module. For shared modules, this is called exactly once, after creating the single (shared) instance. For non-shared modules, this is called once on each instance, after the instace for the region has been created.

Parameters
sourceA IConfigSource

Implements OpenSim.Region.Framework.Interfaces.IRegionModuleBase.

Definition at line 79 of file HGAssetBroker.cs.

void OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset.HGAssetBroker.PostInitialise ( )
inline

This is called exactly once after all the shared region-modules have been instanciated and IRegionModuleBase.Initialised.

Implements OpenSim.Region.Framework.Interfaces.ISharedRegionModule.

Definition at line 150 of file HGAssetBroker.cs.

void OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset.HGAssetBroker.RegionLoaded ( Scene  scene)
inline

This will be called once for every scene loaded. In a shared module this will be multiple times in one instance, while a nonshared module instance will only be called once. This method is called after AddRegion has been called in all modules for that scene, providing an opportunity to request another module's interface, or hook an event from another module.

Parameters
sceneA Scene

Implements OpenSim.Region.Framework.Interfaces.IRegionModuleBase.

Definition at line 172 of file HGAssetBroker.cs.

void OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset.HGAssetBroker.RemoveRegion ( Scene  scene)
inline

This is called whenever a Scene is removed. For shared modules, this can happen several times. For non-shared modules, this happens exactly once, if the scene this instance is associated with is removed.

Parameters
sceneA Scene

Implements OpenSim.Region.Framework.Interfaces.IRegionModuleBase.

Definition at line 168 of file HGAssetBroker.cs.

string OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset.HGAssetBroker.Store ( AssetBase  asset)
inline

Creates a new asset

Returns a random ID if none is passed via the asset argument.

Parameters
asset
Returns
The Asset ID, or string.Empty if an error occurred

Implements OpenSim.Services.Interfaces.IAssetService.

Definition at line 340 of file HGAssetBroker.cs.

bool OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset.HGAssetBroker.UpdateContent ( string  id,
byte[]  data 
)
inline

Update an asset's content

Attachments and bare scripts need this!!

Parameters
id
data
Returns

Implements OpenSim.Services.Interfaces.IAssetService.

Definition at line 378 of file HGAssetBroker.cs.

Property Documentation

string OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset.HGAssetBroker.Name
get

Definition at line 68 of file HGAssetBroker.cs.

Type OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset.HGAssetBroker.ReplaceableInterface
get

Definition at line 63 of file HGAssetBroker.cs.


The documentation for this class was generated from the following file: