~ubuntu-branches/ubuntu/raring/libjboss-remoting-java/raring

« back to all changes in this revision

Viewing changes to src/tests/org/jboss/test/remoting/socketfactory/CreationListenerTestRoot.java

  • Committer: Package Import Robot
  • Author(s): Torsten Werner
  • Date: 2011-09-09 14:01:03 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: package-import@ubuntu.com-20110909140103-hqokx61534tas9rg
Tags: 2.5.3.SP1-1
* Newer but not newest upstream release. Do not build samples.
* Change debian/watch to upstream's svn repo.
* Add patch to fix compile error caused by tomcat update.
  (Closes: #628303)
* Switch to source format 3.0.
* Switch to debhelper level 7.
* Remove useless Depends.
* Update Standards-Version: 3.9.2.
* Update README.source.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
* JBoss, Home of Professional Open Source
 
3
* Copyright 2005, JBoss Inc., and individual contributors as indicated
 
4
* by the @authors tag. See the copyright.txt in the distribution for a
 
5
* full listing of individual contributors.
 
6
*
 
7
* This is free software; you can redistribute it and/or modify it
 
8
* under the terms of the GNU Lesser General Public License as
 
9
* published by the Free Software Foundation; either version 2.1 of
 
10
* the License, or (at your option) any later version.
 
11
*
 
12
* This software is distributed in the hope that it will be useful,
 
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 
15
* Lesser General Public License for more details.
 
16
*
 
17
* You should have received a copy of the GNU Lesser General Public
 
18
* License along with this software; if not, write to the Free
 
19
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 
20
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 
21
*/
 
22
package org.jboss.test.remoting.socketfactory;
 
23
 
 
24
import java.io.IOException;
 
25
import java.net.InetAddress;
 
26
import java.net.InetSocketAddress;
 
27
import java.net.ServerSocket;
 
28
import java.net.Socket;
 
29
import java.util.HashMap;
 
30
import java.util.Map;
 
31
 
 
32
import javax.management.MBeanServer;
 
33
import javax.net.ServerSocketFactory;
 
34
import javax.net.SocketFactory;
 
35
 
 
36
import junit.framework.TestCase;
 
37
 
 
38
import org.apache.log4j.ConsoleAppender;
 
39
import org.apache.log4j.Level;
 
40
import org.apache.log4j.Logger;
 
41
import org.apache.log4j.PatternLayout;
 
42
import org.jboss.remoting.Client;
 
43
import org.jboss.remoting.InvocationRequest;
 
44
import org.jboss.remoting.InvokerLocator;
 
45
import org.jboss.remoting.Remoting;
 
46
import org.jboss.remoting.ServerInvocationHandler;
 
47
import org.jboss.remoting.ServerInvoker;
 
48
import org.jboss.remoting.callback.Callback;
 
49
import org.jboss.remoting.callback.HandleCallbackException;
 
50
import org.jboss.remoting.callback.InvokerCallbackHandler;
 
51
import org.jboss.remoting.socketfactory.CreationListenerServerSocketFactory;
 
52
import org.jboss.remoting.socketfactory.CreationListenerSocketFactory;
 
53
import org.jboss.remoting.socketfactory.SocketCreationListener;
 
54
import org.jboss.remoting.transport.Connector;
 
55
import org.jboss.remoting.transport.PortUtil;
 
56
 
 
57
/** 
 
58
 * @author <a href="ron.sigal@jboss.com">Ron Sigal</a>
 
59
 * @version $Revision: 2895 $
 
60
 * <p>
 
61
 * Copyright Jan 10, 2007
 
62
 * </p>
 
63
 */
 
64
public abstract class CreationListenerTestRoot extends TestCase
 
65
{
 
66
   protected static Logger log = Logger.getLogger(CreationListenerTestRoot.class);
 
67
   protected static boolean firstTime = true;
 
68
   
 
69
   
 
70
   public void setUp() throws Exception
 
71
   {
 
72
      if (firstTime)
 
73
      {
 
74
         firstTime = false;
 
75
         Logger.getLogger("org.jboss.remoting").setLevel(Level.INFO);
 
76
         Logger.getLogger("org.jboss.test.remoting").setLevel(Level.INFO);
 
77
         String pattern = "[%d{ABSOLUTE}] [%t] %5p (%F:%L) - %m%n";
 
78
         PatternLayout layout = new PatternLayout(pattern);
 
79
         ConsoleAppender consoleAppender = new ConsoleAppender(layout);
 
80
         Logger.getRootLogger().addAppender(consoleAppender);  
 
81
      }
 
82
   }
 
83
   
 
84
   
 
85
   public void testSimpleClientSocketCases() throws Exception
 
86
   {
 
87
      log.info("entering " + getName());
 
88
      final InetAddress address = InetAddress.getLocalHost();
 
89
      final String host = address.getHostAddress();
 
90
      final int port = PortUtil.findFreePort(host);
 
91
      
 
92
      class T extends Thread
 
93
      {
 
94
         boolean running;
 
95
         boolean failed = false;
 
96
         void shutdown() {running = false;}
 
97
         boolean failed() {return failed;}
 
98
         public void run()
 
99
         {
 
100
            running = true;
 
101
            try
 
102
            {
 
103
               ServerSocket ss = new ServerSocket(port, 100, address);
 
104
               while (running)
 
105
               {
 
106
                  ss.accept();
 
107
               }
 
108
               ss.close();
 
109
            }
 
110
            catch (IOException e)
 
111
            {
 
112
               failed = true;
 
113
            }
 
114
         }
 
115
      };
 
116
      T t = new T();
 
117
      t.start();
 
118
      Thread.sleep(2000);
 
119
 
 
120
      TestListener listener = new TestListener();
 
121
      SocketFactory sf = getSocketFactory();
 
122
      SocketFactory clsf = new CreationListenerSocketFactory(sf, listener);
 
123
      
 
124
      assertFalse(listener.visited());
 
125
      clsf.createSocket();
 
126
      assertTrue(listener.visited());
 
127
      
 
128
      listener.reset();
 
129
      assertFalse(listener.visited());
 
130
      clsf.createSocket(host, port);
 
131
      assertTrue(listener.visited());
 
132
      
 
133
      listener.reset();
 
134
      assertFalse(listener.visited());
 
135
      clsf.createSocket(host, port, address, PortUtil.findFreePort(host));
 
136
      assertTrue(listener.visited());
 
137
      
 
138
      listener.reset();
 
139
      assertFalse(listener.visited());
 
140
      clsf.createSocket(address, port);
 
141
      assertTrue(listener.visited());
 
142
      
 
143
      listener.reset();
 
144
      assertFalse(listener.visited());
 
145
      clsf.createSocket(address, port, address, PortUtil.findFreePort(host));
 
146
      assertTrue(listener.visited());
 
147
      
 
148
      
 
149
      assertTrue(!t.failed());
 
150
      t.shutdown();
 
151
      log.info(getName() + " PASSES");
 
152
   }
 
153
   
 
154
   
 
155
   public void testSimpleServerSocketCases() throws Exception
 
156
   {
 
157
      log.info("entering " + getName());
 
158
      final InetAddress address = InetAddress.getLocalHost();
 
159
      final String host = address.getHostAddress();
 
160
      
 
161
      class T extends Thread
 
162
      {
 
163
         private ServerSocket ss;
 
164
         private boolean failed = false;
 
165
         boolean failed() {return failed;}
 
166
         T(ServerSocket ss) {this.ss = ss;}
 
167
         public void run()
 
168
         {
 
169
            try
 
170
            {
 
171
               ss.accept();
 
172
               ss.close();
 
173
            }
 
174
            catch (IOException e)
 
175
            {
 
176
               log.error(e);
 
177
               failed = true;
 
178
            }
 
179
         }
 
180
      }
 
181
      
 
182
      TestListener listener = new TestListener();
 
183
      ServerSocketFactory ssf = getServerSocketFactory();
 
184
      ServerSocketFactory clssf = new CreationListenerServerSocketFactory(ssf, listener);
 
185
      
 
186
      ServerSocket ss = clssf.createServerSocket();
 
187
      int freePort = PortUtil.findFreePort(host);
 
188
      ss.bind(new InetSocketAddress(host, freePort));
 
189
      T t = new T(ss);
 
190
      t.start();
 
191
      assertFalse(listener.visited());
 
192
      new Socket(host, freePort);
 
193
      Thread.sleep(500);
 
194
      assertTrue(listener.visited());
 
195
      assertTrue(!t.failed());
 
196
 
 
197
      freePort = PortUtil.findFreePort(host);
 
198
      ss = clssf.createServerSocket(freePort);
 
199
      t = new T(ss);
 
200
      t.start();
 
201
      listener.reset();
 
202
      assertFalse(listener.visited());
 
203
      new Socket(host, freePort);
 
204
      Thread.sleep(500);
 
205
      assertTrue(listener.visited());
 
206
      assertTrue(!t.failed());
 
207
      
 
208
      freePort = PortUtil.findFreePort(host);
 
209
      ss = clssf.createServerSocket(freePort, 100);
 
210
      t = new T(ss);
 
211
      t.start();
 
212
      listener.reset();
 
213
      assertFalse(listener.visited());
 
214
      new Socket(host, freePort);
 
215
      Thread.sleep(500);
 
216
      assertTrue(listener.visited());
 
217
      assertTrue(!t.failed());
 
218
      
 
219
      freePort = PortUtil.findFreePort(host);
 
220
      ss = clssf.createServerSocket(freePort, 100, InetAddress.getLocalHost());
 
221
      t = new T(ss);
 
222
      t.start();
 
223
      listener.reset();
 
224
      assertFalse(listener.visited());
 
225
      new Socket(host, freePort);
 
226
      Thread.sleep(500);
 
227
      assertTrue(listener.visited());
 
228
      assertTrue(!t.failed());
 
229
      log.info(getName() + " PASSES");
 
230
   }
 
231
   
 
232
   
 
233
   public void testClientSideListener() throws Throwable
 
234
   {
 
235
      log.info("entering " + getName());
 
236
      String host = InetAddress.getLocalHost().getHostAddress();
 
237
      int port = PortUtil.findFreePort(host);
 
238
      String locatorURI = getTransport() + "://" + host + ":" + port;
 
239
      InvokerLocator locator = new InvokerLocator(locatorURI);
 
240
      Connector connector = new Connector(locator);
 
241
      connector.create();
 
242
      connector.addInvocationHandler("test", new TestHandler());
 
243
      connector.start();
 
244
      
 
245
      HashMap config = new HashMap();
 
246
      config.put(InvokerLocator.FORCE_REMOTE, "true");
 
247
      TestListener listener1 = new TestListener();
 
248
      config.put(Remoting.SOCKET_CREATION_CLIENT_LISTENER, listener1);
 
249
      TestListener listener2 = new TestListener();
 
250
      config.put(Remoting.SOCKET_CREATION_SERVER_LISTENER, listener2);
 
251
      Client client = new Client(locator, config);
 
252
      assertFalse(listener1.visited());
 
253
      assertFalse(listener2.visited());
 
254
      client.connect();
 
255
      Integer i = (Integer) client.invoke(new Integer(17));
 
256
      assertEquals(18, i.intValue());
 
257
      Thread.sleep(500);
 
258
      assertTrue(listener1.visited());
 
259
      assertFalse(listener2.visited());
 
260
      
 
261
      client.disconnect();
 
262
      connector.stop();
 
263
      log.info(getName() + " PASSES");
 
264
   }
 
265
 
 
266
   
 
267
   public void testServerSideListener() throws Throwable
 
268
   {
 
269
      log.info("entering " + getName());
 
270
      String host = InetAddress.getLocalHost().getHostAddress();
 
271
      int port = PortUtil.findFreePort(host);
 
272
      String locatorURI = getTransport() + "://" + host + ":" + port;
 
273
      InvokerLocator locator = new InvokerLocator(locatorURI);
 
274
      HashMap serverConfig = new HashMap();
 
275
      ServerSocketFactory ssf = getServerSocketFactory();
 
276
      serverConfig.put(Remoting.CUSTOM_SERVER_SOCKET_FACTORY, ssf);
 
277
      TestListener listener1 = new TestListener();
 
278
      serverConfig.put(Remoting.SOCKET_CREATION_SERVER_LISTENER, listener1);
 
279
      TestListener listener2 = new TestListener();
 
280
      serverConfig.put(Remoting.SOCKET_CREATION_CLIENT_LISTENER, listener2);
 
281
      Connector connector = new Connector(locator, serverConfig);
 
282
      connector.create();
 
283
      connector.addInvocationHandler("test", new TestHandler());
 
284
      connector.start();
 
285
      
 
286
      HashMap clientConfig = new HashMap();
 
287
      clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
 
288
      Client client = new Client(locator, clientConfig);
 
289
      client.connect();
 
290
      Integer i = (Integer) client.invoke(new Integer(29));
 
291
      assertEquals(30, i.intValue());
 
292
      Thread.sleep(500);
 
293
      assertTrue(listener1.visited());
 
294
      assertFalse(listener2.visited());
 
295
      
 
296
      client.disconnect();
 
297
      connector.stop();
 
298
      log.info(getName() + " PASSES");
 
299
   }
 
300
   
 
301
   
 
302
   public void testCallbackListeners() throws Throwable
 
303
   {
 
304
      log.info("entering " + getName());
 
305
      String host = InetAddress.getLocalHost().getHostAddress();
 
306
      int port = PortUtil.findFreePort(host);
 
307
      String locatorURI = getTransport() + "://" + host + ":" + port;
 
308
      InvokerLocator locator = new InvokerLocator(locatorURI);
 
309
      HashMap serverConfig = new HashMap();
 
310
      serverConfig.put(InvokerLocator.FORCE_REMOTE, "true");
 
311
      ServerSocketFactory ssf = getServerSocketFactory();
 
312
      serverConfig.put(Remoting.CUSTOM_SERVER_SOCKET_FACTORY, ssf);
 
313
      TestListener listener1 = new TestListener();
 
314
      log.info("listener1: " + listener1);
 
315
      serverConfig.put(Remoting.SOCKET_CREATION_SERVER_LISTENER, listener1);
 
316
      TestListener listener2 = new TestListener();
 
317
      log.info("listener2: " + listener2);
 
318
      serverConfig.put(Remoting.SOCKET_CREATION_CLIENT_LISTENER, listener2);
 
319
      addExtraServerConfig(serverConfig);
 
320
      Connector connector = new Connector(locator, serverConfig);
 
321
      connector.create();
 
322
      connector.addInvocationHandler("test", new TestHandler());
 
323
      connector.start();
 
324
      
 
325
      HashMap clientConfig = new HashMap();
 
326
      clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
 
327
      TestListener listener3 = new TestListener();
 
328
      log.info("listener3: " + listener3);
 
329
      clientConfig.put(Remoting.SOCKET_CREATION_CLIENT_LISTENER, listener3);
 
330
      TestListener listener4 = new TestListener();
 
331
      log.info("listener4: " + listener4);
 
332
      clientConfig.put(Remoting.SOCKET_CREATION_SERVER_LISTENER, listener4);
 
333
      addExtraClientConfig(clientConfig);
 
334
      Client client = new Client(locator, clientConfig);
 
335
      client.connect();
 
336
      client.addListener(new TestCallbackHandler(), null, null, true);
 
337
      Integer i = (Integer) client.invoke(new Integer(29));
 
338
      assertEquals(30, i.intValue());
 
339
      Thread.sleep(500);
 
340
      assertTrue(checkListenersVisited(listener1, listener2, listener3, listener4));
 
341
      
 
342
      client.disconnect();
 
343
      connector.stop();
 
344
      log.info(getName() + " PASSES");
 
345
   }
 
346
   
 
347
   
 
348
   protected boolean checkListenersVisited(TestListener listener1, TestListener listener2,
 
349
         TestListener listener3, TestListener listener4)
 
350
   {
 
351
      return  listener1.visited() &&
 
352
              listener2.visited() &&
 
353
              listener3.visited() &&
 
354
              listener4.visited() &&
 
355
             !listener1.isClient() &&
 
356
              listener2.isClient() &&
 
357
              listener3.isClient() &&
 
358
             !listener4.isClient();
 
359
   }
 
360
   
 
361
   public void testExceptionFromClientListener() throws Throwable
 
362
   {
 
363
      log.info("entering " + getName());
 
364
      String host = InetAddress.getLocalHost().getHostAddress();
 
365
      int port = PortUtil.findFreePort(host);
 
366
      String locatorURI = getTransport() + "://" + host + ":" + port;
 
367
      InvokerLocator locator = new InvokerLocator(locatorURI);
 
368
      Connector connector = new Connector(locator);
 
369
      connector.create();
 
370
      connector.addInvocationHandler("test", new TestHandler());
 
371
      connector.start();
 
372
      
 
373
      HashMap config = new HashMap();
 
374
      config.put(InvokerLocator.FORCE_REMOTE, "true");
 
375
      FailingTestListener listener = new FailingTestListener();
 
376
      config.put(Remoting.SOCKET_CREATION_CLIENT_LISTENER, listener);
 
377
      Client client = new Client(locator, config);
 
378
      
 
379
      try
 
380
      {
 
381
         
 
382
         client.connect();
 
383
         client.invoke(new Integer(17));
 
384
         fail("didn't get expected exception");
 
385
      }
 
386
      catch (Exception e)
 
387
      {
 
388
         log.info("CAUGHT EXPECTED EXCEPTION");
 
389
      }
 
390
      
 
391
      client.disconnect();
 
392
      connector.stop();
 
393
      log.info(getName() + " PASSES");
 
394
   }
 
395
   
 
396
   
 
397
   public void testExceptionFromServerListener() throws Throwable
 
398
   {
 
399
      log.info("entering " + getName());
 
400
      String host = InetAddress.getLocalHost().getHostAddress();
 
401
      int port = PortUtil.findFreePort(host);
 
402
      String locatorURI = getTransport() + "://" + host + ":" + port;
 
403
      InvokerLocator locator = new InvokerLocator(locatorURI);
 
404
      HashMap serverConfig = new HashMap();
 
405
      ServerSocketFactory ssf = getServerSocketFactory();
 
406
      serverConfig.put(Remoting.CUSTOM_SERVER_SOCKET_FACTORY, ssf);
 
407
      FailingTestListener listener = new FailingTestListener();
 
408
      serverConfig.put(Remoting.SOCKET_CREATION_SERVER_LISTENER, listener);
 
409
      Connector connector = new Connector(locator, serverConfig);
 
410
      connector.create();
 
411
      connector.addInvocationHandler("test", new TestHandler());
 
412
      connector.start();
 
413
      
 
414
      HashMap clientConfig = new HashMap();
 
415
      clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
 
416
      clientConfig.put(ServerInvoker.TIMEOUT, "1000");
 
417
      final Client client = new Client(locator, clientConfig);
 
418
      
 
419
      class TestThread extends Thread
 
420
      {
 
421
         public boolean failed = false;
 
422
         
 
423
         public void run()
 
424
         {
 
425
            try
 
426
            {
 
427
               client.connect();
 
428
               client.invoke(new Integer(29));
 
429
               failed = true;
 
430
               client.disconnect();
 
431
               fail("invoke() should have timed out");
 
432
            }
 
433
            catch (Throwable t)
 
434
            {
 
435
               log.info("CAUGHT EXPECTED EXCEPTION");
 
436
            }
 
437
         }
 
438
      };
 
439
 
 
440
      TestThread t = new TestThread();
 
441
      t.start();
 
442
      Thread.sleep(2000);
 
443
      assertFalse(t.failed);
 
444
      connector.stop();
 
445
      log.info(getName() + " PASSES");
 
446
   }
 
447
   
 
448
   
 
449
   public void testCreateClientListenerFromClassName() throws Throwable
 
450
   {
 
451
      log.info("entering " + getName());
 
452
      String host = InetAddress.getLocalHost().getHostAddress();
 
453
      int port = PortUtil.findFreePort(host);
 
454
      String locatorURI = getTransport() + "://" + host + ":" + port;
 
455
      InvokerLocator locator = new InvokerLocator(locatorURI);
 
456
      Connector connector = new Connector(locator);
 
457
      connector.create();
 
458
      connector.addInvocationHandler("test", new TestHandler());
 
459
      connector.start();
 
460
      
 
461
      HashMap config = new HashMap();
 
462
      config.put(InvokerLocator.FORCE_REMOTE, "true");
 
463
      StaticTestListener.reset();
 
464
      String listenerClassName = StaticTestListener.class.getName();
 
465
      config.put(Remoting.SOCKET_CREATION_CLIENT_LISTENER, listenerClassName);
 
466
      Client client = new Client(locator, config);
 
467
      client.connect();
 
468
      Integer i = (Integer) client.invoke(new Integer(17));
 
469
      assertEquals(18, i.intValue());
 
470
      Thread.sleep(500);
 
471
      assertTrue(StaticTestListener.visited());
 
472
      
 
473
      client.disconnect();
 
474
      connector.stop();
 
475
      log.info(getName() + " PASSES");
 
476
   }
 
477
   
 
478
   
 
479
   public void testServerSideListenerFromClassName() throws Throwable
 
480
   {
 
481
      log.info("entering " + getName());
 
482
      String host = InetAddress.getLocalHost().getHostAddress();
 
483
      int port = PortUtil.findFreePort(host);
 
484
      String locatorURI = getTransport() + "://" + host + ":" + port;
 
485
      InvokerLocator locator = new InvokerLocator(locatorURI);
 
486
      HashMap serverConfig = new HashMap();
 
487
      ServerSocketFactory ssf = getServerSocketFactory();
 
488
      serverConfig.put(Remoting.CUSTOM_SERVER_SOCKET_FACTORY, ssf);
 
489
      StaticTestListener.reset();
 
490
      String listenerClassName = StaticTestListener.class.getName();
 
491
      serverConfig.put(Remoting.SOCKET_CREATION_SERVER_LISTENER, listenerClassName);
 
492
      Connector connector = new Connector(locator, serverConfig);
 
493
      connector.create();
 
494
      connector.addInvocationHandler("test", new TestHandler());
 
495
      connector.start();
 
496
      
 
497
      HashMap clientConfig = new HashMap();
 
498
      clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
 
499
      Client client = new Client(locator, clientConfig);
 
500
      client.connect();
 
501
      Integer i = (Integer) client.invoke(new Integer(29));
 
502
      assertEquals(30, i.intValue());
 
503
      Thread.sleep(500);
 
504
      assertTrue(StaticTestListener.visited());
 
505
      
 
506
      client.disconnect();
 
507
      connector.stop();
 
508
      log.info(getName() + " PASSES");
 
509
   }
 
510
   
 
511
   
 
512
   protected abstract String getTransport();
 
513
   
 
514
   
 
515
   protected SocketFactory getSocketFactory()
 
516
   {
 
517
      return SocketFactory.getDefault();
 
518
   }
 
519
   
 
520
   
 
521
   protected ServerSocketFactory getServerSocketFactory()
 
522
   {
 
523
      return ServerSocketFactory.getDefault();
 
524
   }
 
525
   
 
526
   
 
527
   protected void addExtraClientConfig(Map config)
 
528
   {  
 
529
   }
 
530
   
 
531
   
 
532
   protected void addExtraServerConfig(Map config)
 
533
   {
 
534
   }
 
535
   
 
536
   
 
537
   public class TestHandler implements ServerInvocationHandler
 
538
   {
 
539
 
 
540
      public void setMBeanServer(MBeanServer server) {}
 
541
      public void setInvoker(ServerInvoker invoker) {}
 
542
 
 
543
      public Object invoke(InvocationRequest invocation) throws Throwable
 
544
      {
 
545
         Integer i = (Integer) invocation.getParameter();
 
546
         return new Integer(i.intValue() + 1);
 
547
      }
 
548
 
 
549
      public void addListener(InvokerCallbackHandler callbackHandler)
 
550
      {
 
551
         try
 
552
         {
 
553
            callbackHandler.handleCallback(new Callback("callback"));
 
554
         }
 
555
         catch (HandleCallbackException e)
 
556
         {
 
557
            log.error("error handling callback");
 
558
         }
 
559
      }
 
560
      
 
561
      public void removeListener(InvokerCallbackHandler callbackHandler) {}
 
562
   }
 
563
   
 
564
   
 
565
   public class TestCallbackHandler implements InvokerCallbackHandler
 
566
   {
 
567
      public void handleCallback(Callback callback) throws HandleCallbackException
 
568
      {
 
569
         log.info("received callback: " + callback);
 
570
      }  
 
571
   }
 
572
}
 
 
b'\\ No newline at end of file'