if (params < 2 || params > 4)
throw new IllegalArgumentException("Method '" + methodName + "' does not have 2or3 parameters");
if (!Client.class.isAssignableFrom(method.getParameterTypes()[0]))
throw new IllegalArgumentException("Method '" + methodName + "' does not have Client as first parameter");
Channel channel=_bayeux.getChannel(channelId,true);
if (((ChannelImpl)channel).getChannelId().isWild())
{
final Method m=method;
Client wild_client=_bayeux.newClient(_name + "-wild");
wild_client.addListener(_listener instanceof MessageListener.Asynchronous?new AsyncWildListen(wild_client,m):new SyncWildListen(wild_client,m));
channel.subscribe(wild_client);
}
else
{
_methods.put(channelId,method);
channel.subscribe(_client);
}
}