@Override public void listenToTheDm( ListenerCommand command ) throws IOException { listenToTheDm( getMessagingClient(), command ); }
@Override public void listenToTheDm( ListenerCommand command ) throws IOException { listenToTheDm( getMessagingClient(), command ); }
@Override protected void openConnection( IMessagingClient newMessagingClient ) throws IOException { newMessagingClient.setOwnerProperties( getOwnerKind(), this.domain, this.applicationName, this.scopedInstancePath ); newMessagingClient.openConnection(); listenToTheDm( newMessagingClient, ListenerCommand.START ); MsgNotifHeartbeat msg = new MsgNotifHeartbeat( this.applicationName, this.scopedInstancePath, this.ipAddress ); msg.setModelRequired( this.needsModel ); MessagingContext ctx = new MessagingContext( RecipientKind.DM, this.domain, this.applicationName ); newMessagingClient.publish( ctx, msg ); }
@Override protected void openConnection( IMessagingClient newMessagingClient ) throws IOException { newMessagingClient.setOwnerProperties( getOwnerKind(), this.domain, this.applicationName, this.scopedInstancePath ); newMessagingClient.openConnection(); listenToTheDm( newMessagingClient, ListenerCommand.START ); MsgNotifHeartbeat msg = new MsgNotifHeartbeat( this.applicationName, this.scopedInstancePath, this.ipAddress ); msg.setModelRequired( this.needsModel ); MessagingContext ctx = new MessagingContext( RecipientKind.DM, this.domain, this.applicationName ); newMessagingClient.publish( ctx, msg ); }
Assert.assertEquals( MsgCmdSetScopedInstance.class, agentMessages.get( 0 ).getClass()); agentClient.listenToTheDm( ListenerCommand.START ); dmClient.sendMessageToAgent( app, rootInstance, new MsgCmdRemoveInstance( rootInstance )); Thread.sleep( getDelay()); agentClient.listenToTheDm( ListenerCommand.STOP ); Thread.sleep( getDelay());
agentClient_11.listenToTheDm( ListenerCommand.START ); agentClient_12.listenToTheDm( ListenerCommand.START ); agentClient_2.listenToTheDm( ListenerCommand.START ); Thread.sleep( getDelay());
tomcatClient.setExternalMapping( app1.getExternalExports()); tomcatClient.switchMessagingType( getMessagingType()); tomcatClient.listenToTheDm( ListenerCommand.START ); tomcatClient.listenToExportsFromOtherAgents( ListenerCommand.START, tomcat ); this.clients.add( tomcatClient ); apacheClient.setExternalMapping( app1.getExternalExports()); apacheClient.switchMessagingType( getMessagingType()); apacheClient.listenToTheDm( ListenerCommand.START ); apacheClient.listenToExportsFromOtherAgents( ListenerCommand.START, apache ); this.clients.add( apacheClient ); mySqlClient.setExternalMapping( app1.getExternalExports()); mySqlClient.switchMessagingType( getMessagingType()); mySqlClient.listenToTheDm( ListenerCommand.START ); mySqlClient.listenToExportsFromOtherAgents( ListenerCommand.START, mysql ); this.clients.add( mySqlClient ); otherClient.setExternalMapping( app2.getExternalExports()); otherClient.switchMessagingType( getMessagingType()); otherClient.listenToTheDm( ListenerCommand.START ); otherClient.listenToExportsFromOtherAgents( ListenerCommand.START, other ); this.clients.add( otherClient );