org.jboss.errai.bus.server.util
Class ServiceTypeParser
java.lang.Object
org.jboss.errai.bus.server.util.ServiceParser
org.jboss.errai.bus.server.util.ServiceTypeParser
public class ServiceTypeParser
- extends ServiceParser
A ServiceParser
implementation for types annotated with Service
.
- Author:
- Max Barkley
ServiceTypeParser
public ServiceTypeParser(Class<?> clazz)
throws NotAService
- Create a
ServiceParser
for classes annotated with Service
.
- Parameters:
clazz
- A class annotated with Service
.
- Throws:
NotAService
- Thrown if clazz
does not have a Service
annotation.
getRemoteImplementation
public Class<?> getRemoteImplementation()
- Returns:
- The
Remote
interface associated with this type service or null
if none exists.
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
.
toString
public String toString()
- Overrides:
toString
in class Object
getCallback
public MessageCallback getCallback(Object delegateInstance)
- Specified by:
getCallback
in class ServiceParser
Copyright © 2013-2014 JBoss, a division of Red Hat. All Rights Reserved.