Sha256: 0812469ff2f5a9d8b46d25efea763992c06ba8cd23377d027aa8f48708250b8b

Contents?: true

Size: 1.2 KB

Versions: 2

Compression:

Stored size: 1.2 KB

Contents

package com.game_machine.core;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import akka.actor.ActorSystem;
import akka.actor.Props;
import akka.routing.RoundRobinPool;

public class GameMachineLoader {

	

	@SuppressWarnings("unused")
	private static final Logger log = LoggerFactory.getLogger(GameMachineLoader.class);
	public static final Logger logger = LoggerFactory.getLogger("game_machine");
	private static ActorSystem actorSystem;

	
	public static ActorSystem getActorSystem() {
		return actorSystem;
	}
	
	public static void StartMessageGateway() {
		actorSystem.actorOf(new RoundRobinPool(10).props(Props.create(MessageGateway.class)), 
			    MessageGateway.name);
	}
	
	public static void StartEntityTracking() {
		actorSystem.actorOf(new RoundRobinPool(10).props(Props.create(EntityTracking.class)), 
			    EntityTracking.name);
	}
	
	public void run(ActorSystem newActorSystem) {
		Thread.currentThread().setName("game-machine");
		actorSystem = newActorSystem;
		actorSystem.actorOf(Props.create(EventStreamHandler.class), EventStreamHandler.class.getSimpleName());
		
		actorSystem.actorOf(new RoundRobinPool(10).props(Props.create(MessagePersister.class)), 
			    MessagePersister.name);
	}

}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
game_machine-1.0.4 java/project/src/main/java/com/game_machine/core/GameMachineLoader.java
game_machine-1.0.2 java/project/src/main/java/com/game_machine/core/GameMachineLoader.java