Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Java client for EventStore (http://geteventstore.com)
Java Protocol Buffer Shell
Branch: master
Failed to load latest commit information.
client Continued with tests (Issue "Enhance code coverage" #10)
doc Initial commit
.gitignore Initial commit
LICENSE Change LICENSE to LGPL
README.md Added some badges

README.md

esj

Java client for EventStore (http://geteventstore.com)

Build Status Maven Central LGPLv3 License Java Development Kit 1.7

Project website

About

Event Store Java client. Designed to help Java programs easily communicate with Event Store database.

Functionality

Java client functionality:

  • Append event to stream
  • Read from stream
  • Subscribe to stream
  • Delete stream
  • Read events from stream

Code example

Append to stream example:


import lt.emasina.esj.EventStore;
import lt.emasina.esj.model.Message;
...
EventStore es = new EventStore(InetAddress.getByName(HOSTNAME), PORTNUMBER);
...
es.appendToStream(STREAM_NAME, new ResponseReceiver() {
    @Override
    public void onResponseReturn(Message msg) {
        // do something
    },
    @Override
    public void onErrorReturn(Exception ex){
        // do something
    }
},EVENT);
...
es.close();

or in Java 7 manner:


import lt.emasina.esj.EventStore;
import lt.emasina.esj.model.Message;
...
try (EventStore es = new EventStore(InetAddress.getByName(HOSTNAME), PORTNUMBER)) {
    ...
    es.appendToStream(STREAM_NAME, new ResponseReceiver() {
    @Override
    public void onResponseReturn(Message msg) {
        // do something
    },
    @Override
    public void onErrorReturn(Exception ex){
        // do something
    }
    },EVENT);
    ...
}

Something went wrong with that request. Please try again.