Package com.ngt.jopenmetaverse.shared.sim.asset

Examples of com.ngt.jopenmetaverse.shared.sim.asset.Asset


              MethodDelegate<Void, AssetReceivedCallbackArgs> assetReceivedCallback
              = new MethodDelegate<Void, AssetReceivedCallbackArgs>()
              {
                public Void execute(AssetReceivedCallbackArgs e) {
                  AssetDownload transfer = e.getTransfer();
                  Asset asset = e.getAsset();
                  if (transfer.Success && asset instanceof AssetWearable)
                  {
                    // Update this wearable with the freshly downloaded asset
                    wearable.Asset = (AssetWearable)asset;
View Full Code Here


            byte[] data = Cache.getCachedAssetBytes(assetID);
            transfer.AssetData = data;
            transfer.Success = true;
            transfer.Status = StatusCode.OK;

            Asset asset = CreateAssetWrapper(type);
            asset.AssetData = data;
            asset.setAssetID(assetID);

            try { callback.execute(new AssetReceivedCallbackArgs(transfer, asset)); }
            catch (Exception e) { JLogger.error(e); }

            return;
View Full Code Here

            byte[] data = Cache.getCachedAssetBytes(assetID);
            transfer.AssetData = data;
            transfer.Success = true;
            transfer.Status = StatusCode.OK;

            Asset asset = CreateAssetWrapper(type);
            asset.AssetData = data;
            asset.setAssetID(assetID);

            try { callback.execute(new AssetReceivedCallbackArgs(transfer, asset)); }
            catch (Exception e) { JLogger.error(e); }

            return;
View Full Code Here

    //region Helpers

    private Asset CreateAssetWrapper(AssetType type)
    {
        Asset asset;

        switch (type)
        {
            case Notecard:
                asset = new AssetNotecard();
View Full Code Here

        return asset;
    }

    private Asset WrapAsset(AssetDownload download)
    {
        Asset asset = CreateAssetWrapper(download.AssetType);
        if (asset != null)
        {
            asset.setAssetID(download.AssetID);
            asset.AssetData = download.AssetData;
            return asset;
        }
        else
        {
View Full Code Here

TOP

Related Classes of com.ngt.jopenmetaverse.shared.sim.asset.Asset

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.