Errai 3.0.1-SNAPSHOT

org.jboss.errai.bus.server.io
Class ServiceMethodCallback

java.lang.Object
  extended by org.jboss.errai.bus.server.io.ServiceMethodCallback
All Implemented Interfaces:
MessageCallback

public class ServiceMethodCallback
extends Object

A callback implementation for methods annotated with Service.

Author:
Max Barkley

Constructor Summary
ServiceMethodCallback(Object delegate, Method service)
          Create a callback to the given service method.
 
Method Summary
 void callback(Message message)
          Called by the Message Bus every time it processes a message with the subject this callback is registered for.
protected  void maybeUnwrapAndThrowError(Throwable throwable)
           
protected  void verifyMethodSignature(Method method)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceMethodCallback

public ServiceMethodCallback(Object delegate,
                             Method service)
Create a callback to the given service method.

Parameters:
delegate - The instance on which the service method should be invoked.
service - The service method to be invoked.
Method Detail

callback

public void callback(Message message)
Description copied from interface: MessageCallback
Called by the Message Bus every time it processes a message with the subject this callback is registered for.

Parameters:
message - The message on the bus. Avoid making changes to this object, because it will continue to be reused by the framework and the same Message instance will be passed to other callbacks.

maybeUnwrapAndThrowError

protected void maybeUnwrapAndThrowError(Throwable throwable)
                                 throws RuntimeException
Throws:
RuntimeException

verifyMethodSignature

protected void verifyMethodSignature(Method method)

Errai 3.0.1-SNAPSHOT

Copyright © 2013-2014 JBoss, a division of Red Hat. All Rights Reserved.