Bitcoin Forum
May 09, 2024, 09:04:54 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bitcoinj - EventListener  (Read 1127 times)
curiosity81 (OP)
Legendary
*
Offline Offline

Activity: 1778
Merit: 1070



View Profile
September 02, 2014, 11:14:11 AM
 #1

Hallo,

kennt sich hier jemand mit Bitcoinj aus? Ich spiele damit gerade ein wenig herum und kann inzwischen alle Funktionen rudimentaer nutzen. Dies beinhaltet aber mehr oder weniger ein manuelles Monitoring der Funktionen.

Z.B. wuerde ich gerne eine Transaktion taetigen, und dann soll der Code solange warten bis die Transaktion nicht mehr den Status "pending" hat. Wie wuerde man soetwas am besten umsetzten???

Aktuell rufe ich naemlich den Transaktionscode auf, der folgende Code ist auskommentiert. Dann warte ich bis die Transaktion nicht mehr "pending" ist (ich pruefe dies durch mehrfaches laden den Wallet), kommentiere diesen Code aus und der folgende Code wird aktiviert.

Das soll aber alles automatisch ablaufen. Meine Vermutung ist, dass man das mit Eventlisteners implementieren koennte, mir geht aber noch nicht ganz auf was dafuer alles "zusammengesteckt" werden muss.

Gruss,
cu

          ▄▄██▄▄
      ▄▄██████████▄▄
  ▄▄██████▀▀  ▀▀██████▄▄

███████▀          ▀███████
████       ▄▄▄▄     ▄█████
████     ███████▄▄██████▀
████     ██████████████
████     ████████▀██████▄
████       ▀▀▀▀     ▀█████
███████▄          ▄███████
  ▀▀██████▄▄  ▄▄██████▀▀
      ▀▀██████████▀▀
          ▀▀██▀▀
COINVEST
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
WEBSITE  ●  WHITEPAPER  ●  DEMO
ANN  ●  TELEGRAM  ●  BLOG

▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
       ▄▄█████████▄▄
    ▄██████▀▀▀▀▀██████▄
  ▄████▀▀         ▀▀████▄
 ▄████    ▄▄███▄▄    ████▄
▄████  ▄███▀▀ ▀▀███▄  ████▄
████   ██▌  ▄▄▄  ███   ████
████   ██▌ ▐███████    ████
████   ██▌  ▀▀▀  ███   ████
▀████  ▀███▄▄ ▄▄███▀  ████▀

 ▀████    ▀▀███▀▀    ████▀
  ▀████▄▄         ▄▄████▀

    ▀██████▄▄▄▄▄██████▀
       ▀▀█████████▀▀
COINTOKEN
The forum strives to allow free discussion of any ideas. All policies are built around this principle. This doesn't mean you can post garbage, though: posts should actually contain ideas, and these ideas should be argued reasonably.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715245494
Hero Member
*
Offline Offline

Posts: 1715245494

View Profile Personal Message (Offline)

Ignore
1715245494
Reply with quote  #2

1715245494
Report to moderator
1715245494
Hero Member
*
Offline Offline

Posts: 1715245494

View Profile Personal Message (Offline)

Ignore
1715245494
Reply with quote  #2

1715245494
Report to moderator
curiosity81 (OP)
Legendary
*
Offline Offline

Activity: 1778
Merit: 1070



View Profile
September 03, 2014, 03:46:57 PM
 #2

Ok. Habs kapiert. Ist halt alles nebenlaeufig und muss auch so behandelt werden.

Wer (auch allgemeine) Fragen zu bitcoinj hat kann mich anschreiben.

Gruss,
cu

          ▄▄██▄▄
      ▄▄██████████▄▄
  ▄▄██████▀▀  ▀▀██████▄▄

███████▀          ▀███████
████       ▄▄▄▄     ▄█████
████     ███████▄▄██████▀
████     ██████████████
████     ████████▀██████▄
████       ▀▀▀▀     ▀█████
███████▄          ▄███████
  ▀▀██████▄▄  ▄▄██████▀▀
      ▀▀██████████▀▀
          ▀▀██▀▀
COINVEST
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
WEBSITE  ●  WHITEPAPER  ●  DEMO
ANN  ●  TELEGRAM  ●  BLOG

▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
       ▄▄█████████▄▄
    ▄██████▀▀▀▀▀██████▄
  ▄████▀▀         ▀▀████▄
 ▄████    ▄▄███▄▄    ████▄
▄████  ▄███▀▀ ▀▀███▄  ████▄
████   ██▌  ▄▄▄  ███   ████
████   ██▌ ▐███████    ████
████   ██▌  ▀▀▀  ███   ████
▀████  ▀███▄▄ ▄▄███▀  ████▀

 ▀████    ▀▀███▀▀    ████▀
  ▀████▄▄         ▄▄████▀

    ▀██████▄▄▄▄▄██████▀
       ▀▀█████████▀▀
COINTOKEN
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!