String channelName = "/test/granted";
bayeux.createChannelIfAbsent(channelName, new ConfigurableServerChannel.Initializer()
{
public void configureChannel(final ConfigurableServerChannel channel)
{
channel.addAuthorizer(new Authorizer()
{
public Result authorize(Operation operation, ChannelId channelId, ServerSession session, ServerMessage message)
{
channel.removeAuthorizer(this);
return Result.grant();