* Stack -> null
*/
CurrentActor.set(connectionActor);
//Use the Actor to send a simple message
CurrentActor.get().message(new LogSubject()
{
public String toString()
{
return "[CurrentActorTest] ";
}
}, new LogMessage()
{
public String toString()
{
return "Connection Log Msg";
}
});
// Verify it was the same actor as we set earlier
assertEquals("Retrieved actor is not as expected ",
connectionActor, CurrentActor.get());
/**
* Set the actor to now be the Channel actor so testing the ability
* to push the actor on to the stack:
*
* CurrentActor -> Channel
* Stack -> Connection, null
*
*/
AMQChannel channel = new AMQChannel(_session, 1, _session.getVirtualHost().getMessageStore());
AMQPChannelActor channelActor = new AMQPChannelActor(channel,
ApplicationRegistry.getInstance().
getRootMessageLogger());
CurrentActor.set(channelActor);
//Use the Actor to send a simple message
CurrentActor.get().message(new LogSubject()
{
public String toString()
{
return "[CurrentActorTest] ";
}