String credString = username + ":" + password;
Encoder encoder = new Encoder( credString.length() );
encoder.encode( credString.getBytes() );
commandMessage.setBody( encoder.drain() );
commandMessage.setDestination( DESTINATION );
return commandMessage;
}
private static CommandMessage createLogoutCommandMessage()