org.neuclear.asset.contracts
Class Asset

java.lang.Object
  extended by org.neuclear.id.SignedNamedObject
      extended by org.neuclear.id.Identity
          extended by org.neuclear.id.Service
              extended by org.neuclear.asset.contracts.Asset
All Implemented Interfaces:
java.security.Principal, org.neuclear.id.HTMLBased

public final class Asset
extends org.neuclear.id.Service

The assetName contains information about a tradeable Asset. The Asset is in itself a subclass of Identity, which means that any transactions signed by it must be in the formatter of neu://assetname/1231q145452452345 where assetname is the unique NeuClear wide AssetCertificate.

As a subclass of Identity you cant instantiate these classes your self, but must be gotten in this form:

(Asset)NSResolver.resolveIdentity("neu://assetname");

To create your own assets use AssetBuilder sign it using a valid NeuClear signer and post its description to your default online repository. Then anyone can access your Assets through the above interface.

See Also:
AssetBuilder

Nested Class Summary
static class Asset.Reader
           
 
Field Summary
 
Fields inherited from class org.neuclear.id.Service
serviceSignatory, serviceUrl
 
Fields inherited from class org.neuclear.id.Identity
DEFAULT_SIGNER
 
Constructor Summary
protected Asset(org.neuclear.id.SignedNamedCore core, java.lang.String nickname, java.lang.String original, java.lang.String serviceUrl, java.security.PublicKey servicekey, java.security.PublicKey issuerKey, org.neuclear.id.targets.Targets targets, int decimal, double minimumTransaction, java.lang.String units, FeeStructure fees, java.security.PublicKey feePub)
           
 
Method Summary
 int getDecimal()
           
 org.neuclear.id.Signatory getFeeAccount()
           
 FeeStructure getFeeStructure()
           
 java.text.NumberFormat getFormatter(java.util.Locale locale)
           
 org.neuclear.id.Signatory getIssuer()
           
 double getMinimumTransaction()
           
 int getMultiplier()
           
 java.lang.String getUnits()
           
 boolean isValidAmount(double amount)
          Checks if an amount is valid within the boundaries of the assetName.
 double round(double amount)
          Rounds a given value to fit within the valid numbers of the
 
Methods inherited from class org.neuclear.id.Service
extractPublicKey, getServiceId, getServiceKey, getServiceSignatory, getServiceUrl, service
 
Methods inherited from class org.neuclear.id.Identity
extractNickName, extractOrginalUrl, getLatestVersion, getNickname, getURL, send, toString
 
Methods inherited from class org.neuclear.id.SignedNamedObject
clone, createNEUIDQName, equals, getDigest, getEncoded, getName, getSignatory, getTagName, getTimeStamp, hashCode
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.security.Principal
equals, getName, hashCode
 

Constructor Detail

Asset

protected Asset(org.neuclear.id.SignedNamedCore core,
                java.lang.String nickname,
                java.lang.String original,
                java.lang.String serviceUrl,
                java.security.PublicKey servicekey,
                java.security.PublicKey issuerKey,
                org.neuclear.id.targets.Targets targets,
                int decimal,
                double minimumTransaction,
                java.lang.String units,
                FeeStructure fees,
                java.security.PublicKey feePub)
Method Detail

isValidAmount

public final boolean isValidAmount(double amount)
Checks if an amount is valid within the boundaries of the assetName.

Parameters:
amount -
Returns:

round

public final double round(double amount)
Rounds a given value to fit within the valid numbers of the

Parameters:
amount -
Returns:

getIssuer

public final org.neuclear.id.Signatory getIssuer()

getDecimal

public int getDecimal()

getMultiplier

public int getMultiplier()

getMinimumTransaction

public double getMinimumTransaction()

getUnits

public java.lang.String getUnits()

getFormatter

public java.text.NumberFormat getFormatter(java.util.Locale locale)

getFeeStructure

public final FeeStructure getFeeStructure()

getFeeAccount

public final org.neuclear.id.Signatory getFeeAccount()


Copyright © 2003-2004 Antilles Software Ventures SA. All Rights Reserved.