Search in sources :

Example 1 with SolrMatcherActor

use of won.matcher.solr.actor.SolrMatcherActor in project webofneeds by researchstudio-sat.

the class SolrTest method main.

public static void main(String[] args) throws IOException, InterruptedException {
    // init basic Akka
    AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(MatcherSolrAppConfiguration.class);
    ActorSystem system = ctx.getBean(ActorSystem.class);
    ActorRef solrMatcherActor = system.actorOf(SpringExtension.SpringExtProvider.get(system).props(SolrMatcherActor.class), "SolrMatcherActor");
    NeedEvent ne1 = createNeedEvent("/needmodel/need1.trig");
    NeedEvent ne2 = createNeedEvent("/needmodel/need2.trig");
    solrMatcherActor.tell(ne1, null);
    Thread.sleep(5000);
    solrMatcherActor.tell(ne2, null);
}
Also used : ActorSystem(akka.actor.ActorSystem) AnnotationConfigApplicationContext(org.springframework.context.annotation.AnnotationConfigApplicationContext) SolrMatcherActor(won.matcher.solr.actor.SolrMatcherActor) ActorRef(akka.actor.ActorRef) NeedEvent(won.matcher.service.common.event.NeedEvent)

Aggregations

ActorRef (akka.actor.ActorRef)1 ActorSystem (akka.actor.ActorSystem)1 AnnotationConfigApplicationContext (org.springframework.context.annotation.AnnotationConfigApplicationContext)1 NeedEvent (won.matcher.service.common.event.NeedEvent)1 SolrMatcherActor (won.matcher.solr.actor.SolrMatcherActor)1