OpenSim
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Classes | Public Member Functions | Protected Member Functions | Properties | List of all members
OpenSim.Services.Connectors.AssetServicesConnector Class Reference
Inheritance diagram for OpenSim.Services.Connectors.AssetServicesConnector:
Inheritance graph
[legend]
Collaboration diagram for OpenSim.Services.Connectors.AssetServicesConnector:
Collaboration graph
[legend]

Public Member Functions

 AssetServicesConnector ()
 
 AssetServicesConnector (string serverURI)
 
 AssetServicesConnector (IConfigSource source)
 
virtual void Initialise (IConfigSource source)
 
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...
 
- Public Member Functions inherited from OpenSim.Services.Connectors.BaseServiceConnector
 BaseServiceConnector ()
 
 BaseServiceConnector (IConfigSource config, string section)
 
void Initialise (IConfigSource config, string section)
 

Protected Member Functions

void retryCheck (object source, ElapsedEventArgs e)
 
void SetCache (IImprovedAssetCache cache)
 

Properties

int MaxAssetRequestConcurrency [get, set]
 

Additional Inherited Members

- Protected Attributes inherited from OpenSim.Services.Connectors.BaseServiceConnector
IServiceAuth m_Auth
 

Detailed Description

Definition at line 43 of file AssetServicesConnector.cs.

Constructor & Destructor Documentation

OpenSim.Services.Connectors.AssetServicesConnector.AssetServicesConnector ( )
inline

Definition at line 74 of file AssetServicesConnector.cs.

OpenSim.Services.Connectors.AssetServicesConnector.AssetServicesConnector ( string  serverURI)
inline

Definition at line 78 of file AssetServicesConnector.cs.

OpenSim.Services.Connectors.AssetServicesConnector.AssetServicesConnector ( IConfigSource  source)
inline

Definition at line 83 of file AssetServicesConnector.cs.

Member Function Documentation

virtual bool [] OpenSim.Services.Connectors.AssetServicesConnector.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 428 of file AssetServicesConnector.cs.

bool OpenSim.Services.Connectors.AssetServicesConnector.Delete ( string  id)
inline

Delete an asset

Parameters
id
Returns

Implements OpenSim.Services.Interfaces.IAssetService.

Definition at line 572 of file AssetServicesConnector.cs.

AssetBase OpenSim.Services.Connectors.AssetServicesConnector.Get ( string  id)
inline

Get an asset synchronously.

Parameters
id
Returns

Implements OpenSim.Services.Interfaces.IAssetService.

Definition at line 219 of file AssetServicesConnector.cs.

bool OpenSim.Services.Connectors.AssetServicesConnector.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 382 of file AssetServicesConnector.cs.

AssetBase OpenSim.Services.Connectors.AssetServicesConnector.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 246 of file AssetServicesConnector.cs.

byte [] OpenSim.Services.Connectors.AssetServicesConnector.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 272 of file AssetServicesConnector.cs.

AssetMetadata OpenSim.Services.Connectors.AssetServicesConnector.GetMetadata ( string  id)
inline

Get an asset's metadata

Parameters
id
Returns

Implements OpenSim.Services.Interfaces.IAssetService.

Definition at line 256 of file AssetServicesConnector.cs.

virtual void OpenSim.Services.Connectors.AssetServicesConnector.Initialise ( IConfigSource  source)
inlinevirtual
void OpenSim.Services.Connectors.AssetServicesConnector.retryCheck ( object  source,
ElapsedEventArgs  e 
)
inlineprotected

Definition at line 167 of file AssetServicesConnector.cs.

void OpenSim.Services.Connectors.AssetServicesConnector.SetCache ( IImprovedAssetCache  cache)
inlineprotected

Definition at line 214 of file AssetServicesConnector.cs.

string OpenSim.Services.Connectors.AssetServicesConnector.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 451 of file AssetServicesConnector.cs.

bool OpenSim.Services.Connectors.AssetServicesConnector.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 542 of file AssetServicesConnector.cs.

Property Documentation

int OpenSim.Services.Connectors.AssetServicesConnector.MaxAssetRequestConcurrency
getset

Definition at line 69 of file AssetServicesConnector.cs.


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