Adapting for Ethereym as a library style:
+ BlockChain screen adapted + ConnectionConsole screen adapted + ToolBar Screen adapted
This commit is contained in:
parent
7f3c44e514
commit
d2c29c07f3
|
@ -18,8 +18,6 @@
|
|||
* Install jar with sources to the maven repository
|
||||
mvn install -Dmaven.test.skip=true
|
||||
|
||||
* Release to mvn repository in github (settings.xml should be updated with user/pass):
|
||||
mvn clean deploy -Dmaven.test.skip=true
|
||||
-->
|
||||
|
||||
<developers>
|
||||
|
|
|
@ -2,6 +2,7 @@ package org.ethereum.facade;
|
|||
|
||||
import org.ethereum.core.Block;
|
||||
import org.ethereum.listener.EthereumListener;
|
||||
import org.ethereum.net.client.ClientPeer;
|
||||
import org.ethereum.net.client.PeerData;
|
||||
|
||||
import java.net.InetAddress;
|
||||
|
@ -24,10 +25,16 @@ public interface Ethereum {
|
|||
public void connect(String ip, int port);
|
||||
|
||||
public Block getBlockByIndex(long index);
|
||||
|
||||
public long getBlockChainSize();
|
||||
|
||||
public void addListener(EthereumListener listener);
|
||||
|
||||
public void loadBlockChain();
|
||||
|
||||
|
||||
public ClientPeer getDefaultPeer();
|
||||
|
||||
public void close();
|
||||
|
||||
}
|
||||
|
|
|
@ -106,4 +106,24 @@ public class EthereumImpl implements Ethereum {
|
|||
public void loadBlockChain() {
|
||||
WorldManager.getInstance().loadBlockchain();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void close() {
|
||||
WorldManager.getInstance().close();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClientPeer getDefaultPeer(){
|
||||
|
||||
ClientPeer peer = WorldManager.getInstance().getActivePeer();
|
||||
if (peer == null){
|
||||
|
||||
peer = new ClientPeer();
|
||||
WorldManager.getInstance().setActivePeer(peer);
|
||||
}
|
||||
|
||||
return peer;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -106,6 +106,11 @@ public class ClientPeer {
|
|||
}
|
||||
}
|
||||
|
||||
public void setPeerListener(PeerListener peerListener) {
|
||||
this.peerListener = peerListener;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* The wire gets data for signed transactions and
|
||||
* sends it to the net.
|
||||
|
|
|
@ -51,6 +51,12 @@
|
|||
<name>bintray</name>
|
||||
<url>http://dl.bintray.com/ethereum/maven/</url>
|
||||
</repository>
|
||||
|
||||
<repository>
|
||||
<id>mvn-central</id>
|
||||
<name>maven</name>
|
||||
<url> http://repo1.maven.org/maven2</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
|
||||
|
@ -68,15 +74,13 @@
|
|||
|
||||
<dependencies>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.ethereum</groupId>
|
||||
<artifactId>ethereumj</artifactId>
|
||||
<version>0.5.6.20140904.1950</version>
|
||||
<version>0.5.6</version>
|
||||
<type>jar</type>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>com.maxmind.geoip2</groupId>
|
||||
<artifactId>geoip2</artifactId>
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
package org.ethereum.gui;
|
||||
|
||||
import org.ethereum.facade.Ethereum;
|
||||
import org.ethereum.facade.EthereumImpl;
|
||||
|
||||
/**
|
||||
* www.ethereumJ.com
|
||||
*
|
||||
* @author: Roman Mandeleil
|
||||
* Created on: 01/09/2014 19:43
|
||||
*/
|
||||
|
||||
public class UIEthereumManager {
|
||||
public static Ethereum ethereum = new EthereumImpl();
|
||||
}
|
Loading…
Reference in New Issue