package com.javahonk.subscriber;

import javax.annotation.PostConstruct;

import org.springframework.beans.factory.annotation.Autowired;

import com.google.common.eventbus.EventBus;
import com.google.common.eventbus.Subscribe;

public class Subscriber2 {
	
	@Autowired
	EventBus eventBus;
	
	@PostConstruct
	public void init(){
		eventBus.register(this);
	}
	
	@Subscribe
	public void getPublishData(SendPostThourghClass sendPostThourghClass){
		System.out.println("Got post data on Subscriber2: "+sendPostThourghClass.getName());
	}

}
