Errai 3.0.1-SNAPSHOT

org.jboss.errai.bus.server.util
Class ServiceMethodParser

java.lang.Object
  extended by org.jboss.errai.bus.server.util.ServiceParser
      extended by org.jboss.errai.bus.server.util.ServiceMethodParser

public class ServiceMethodParser
extends ServiceParser

A ServiceParser implementation for methods annotated with Service.

Author:
Max Barkley

Field Summary
 
Fields inherited from class org.jboss.errai.bus.server.util.ServiceParser
commandPoints, local, svcName
 
Constructor Summary
ServiceMethodParser(Method method)
          Create a ServiceParser for methods annotated with Service.
 
Method Summary
 MessageCallback getCallback(Object delegate)
           
 Class<?> getDelegateClass()
           
 boolean isCallback()
           
 String toString()
           
 
Methods inherited from class org.jboss.errai.bus.server.util.ServiceParser
getCommandPoints, getServiceName, hasCommandPoints, isLocal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ServiceMethodParser

public ServiceMethodParser(Method method)
                    throws NotAService
Create a ServiceParser for methods annotated with Service.

Parameters:
method - A method annotated with Service.
Throws:
NotAService - Thrown if method does not have a Service annotation.
Method Detail

getDelegateClass

public Class<?> getDelegateClass()
Specified by:
getDelegateClass in class ServiceParser
Returns:
The Class of the delegate instance for this service.

For a Service annotation on a type, this will be that type.
For a Service annotation on a method, this will be the enclosing type.

isCallback

public boolean isCallback()
Specified by:
isCallback in class ServiceParser
Returns:
True iff this is a type service with no command points, and this type is assignable to a MessageCallback.

getCallback

public MessageCallback getCallback(Object delegate)
Specified by:
getCallback in class ServiceParser

toString

public String toString()
Overrides:
toString in class Object

Errai 3.0.1-SNAPSHOT

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