Esempio n. 1
0
 /** Return instance of the bitcoin network */
 public static BitcoinNetworkManager getNetwork() {
   try {
     return (BitcoinNetworkManager)
         ApplicationSession.getInstance()
             .getFermatSystem()
             .getPlugin(
                 new PluginVersionReference(
                     Platforms.BLOCKCHAINS,
                     Layers.CRYPTO_NETWORK,
                     Plugins.BITCOIN_NETWORK,
                     Developers.BITDUBAI,
                     new Version()));
   } catch (VersionNotFoundException e) {
     e.printStackTrace();
   } catch (CantStartPluginException e) {
     e.printStackTrace();
   }
   return null;
 }
Esempio n. 2
0
 /**
  * return Instance of cloud client
  *
  * @return
  */
 public static WsCommunicationsCloudClientManager getCloudClient() {
   try {
     return (WsCommunicationsCloudClientManager)
         ApplicationSession.getInstance()
             .getFermatSystem()
             .getPlugin(
                 new PluginVersionReference(
                     Platforms.COMMUNICATION_PLATFORM,
                     Layers.COMMUNICATION,
                     Plugins.WS_CLOUD_CLIENT,
                     Developers.BITDUBAI,
                     new Version()));
   } catch (VersionNotFoundException e) {
     e.printStackTrace();
   } catch (CantStartPluginException e) {
     e.printStackTrace();
   }
   return null;
 }