return delegate;
}
public Object handleCreateConsumerDelegate(Invocation invocation) throws Throwable
{
ClientConsumerDelegate consumerDelegate = (ClientConsumerDelegate)invocation.invokeNext();
DelegateSupport delegate = (DelegateSupport)consumerDelegate;
SessionState sessionState = (SessionState)getState(invocation);
MethodInvocation mi = (MethodInvocation)invocation;
JBossDestination dest = (JBossDestination)mi.getArguments()[0];
String selector = (String)mi.getArguments()[1];
boolean noLocal = ((Boolean)mi.getArguments()[2]).booleanValue();
String subscriptionName = (String)mi.getArguments()[3];
boolean connectionConsumer = ((Boolean)mi.getArguments()[4]).booleanValue();
String consumerID = consumerDelegate.getID();
int bufferSize = consumerDelegate.getBufferSize();
int maxDeliveries = consumerDelegate.getMaxDeliveries();
long redeliveryDelay = consumerDelegate.getRedeliveryDelay();
ConsumerState consumerState =
new ConsumerState(sessionState, consumerDelegate, dest, selector, noLocal,
subscriptionName, consumerID, connectionConsumer, bufferSize,
maxDeliveries, redeliveryDelay);