This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void shouldForwardLookupMessageLookupActor(){ | |
createActorWithPath("lookup-source-"+SOURCE_ID, testProbe); | |
ActorRef ref = testProbe.ref(); | |
lookupActor.tell(new GetContent(SOURCE_ID, SYSTEM_ENTRY_TIME), ref); | |
LookupResponse actual = testProbe.expectMsgClass(LookupResponse.class); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DeserializerFactory withAdditionalDeserializers = BeanDeserializerFactory.instance.withAdditionalDeserializers(setupEnumDeserializer()); | |
DefaultDeserializationContext.Impl dc = new DefaultDeserializationContext.Impl(withAdditionalDeserializers); | |
ObjectMapper defaultMapper = new ObjectMapper(null, null, dc); | |
private Deserializers setupEnumDeserializer() { | |
Deserializers d = new Deserializers.Base() { | |
@Override |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Component | |
@Profile("untrusted") | |
public class SelfSignedTrustCertConfigurer { | |
private final static Logger logger = LoggerFactory.getLogger(SelfSignedTrustCertConfigurer.class.getName()); | |
@PostConstruct | |
public void allowUntrustedCerts() { | |
HostnameVerifier hv = new HostnameVerifier() { | |
public boolean verify(String urlHostName, SSLSession session) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<plugin> | |
<groupId>com.lazerycode.jmeter</groupId> | |
<artifactId>jmeter-maven-plugin</artifactId> | |
<version>1.9.0</version> | |
<executions> | |
<execution> | |
<id>jmeter-tests</id> | |
<phase>verify</phase> | |
<goals> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function subscriber(){ | |
var socket = $.atmosphere; | |
var subSocket; | |
var model = [] ; | |
var obj = { | |
getModel : function(){ return model ; }, | |
subscribe : function(){ | |
var request = { url : document.location.toString()+'atmosphere/?channelId=12351', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Component("broadcastQueueConsumer") | |
public class BroadcastListener implements MessageListener{ | |
private final static Logger logger = Logger.getLogger(BroadcastListener.class.getName()); | |
@Autowired | |
private SimpleMessageConverter messageAdapter ; | |
@Autowired | |
private BroadcastService broadcastService; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dependency> | |
<groupId>org.springframework.amqp</groupId> | |
<artifactId>spring-rabbit</artifactId> | |
<version>1.1.0.RELEASE</version> | |
</dependency> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<beans xmlns="http://www.springframework.org/schema/beans" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xmlns:rabbit="http://www.springframework.org/schema/rabbit" xmlns:context="http://www.springframework.org/schema/context" | |
xsi:schemaLocation="http://www.springframework.org/schema/rabbit http://www.springframework.org/schema/rabbit/spring-rabbit-1.1.xsd | |
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> | |
<rabbit:connection-factory id="connectionFactory" host="${rabbitmq.host:localhost}" port="${rabbitmq.port:5672}" | |
username="guest" password="guest" connection-factory="rcf" /> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Service | |
public class BroadcastService { | |
private final static Logger logger = Logger.getLogger(BroadcastService.class.getName()); | |
private Map<String, Broadcaster> broadcastTokens = new ConcurrentHashMap<String, Broadcaster>(); | |
public void broadcast(String message) { | |
for (Broadcaster token : broadcastTokens.values()) { | |
token.broadcast(message); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Atmosphere --> | |
<servlet> | |
<description>AtmosphereServlet</description> | |
<servlet-name>AtmosphereServlet</servlet-name> | |
<servlet-class>org.atmosphere.cpr.AtmosphereServlet</servlet-class> | |
<init-param> | |
<param-name>org.atmosphere.cpr.broadcasterLifeCyclePolicy</param-name> | |
<param-value>EMPTY_DESTROY</param-value> |