Errai 3.0.1-SNAPSHOT

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

java.lang.Object
  extended by org.jboss.errai.bus.server.util.ServiceParser
Direct Known Subclasses:
ServiceMethodParser, ServiceTypeParser

public abstract class ServiceParser
extends Object

Parses and stores Service and Command meta-data for registering a MessageCallback.

Author:
Max Barkley

Field Summary
protected  Map<String,Method> commandPoints
           
protected  boolean local
           
protected  String svcName
           
 
Constructor Summary
ServiceParser()
           
 
Method Summary
abstract  MessageCallback getCallback(Object delegateInstance)
           
 Map<String,Method> getCommandPoints()
          Get all (if any) Command endpoints for this service.
abstract  Class<?> getDelegateClass()
           
 String getServiceName()
           
 boolean hasCommandPoints()
           
abstract  boolean isCallback()
           
 boolean isLocal()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

local

protected boolean local

svcName

protected String svcName

commandPoints

protected Map<String,Method> commandPoints
Constructor Detail

ServiceParser

public ServiceParser()
Method Detail

getCommandPoints

public Map<String,Method> getCommandPoints()
Get all (if any) Command endpoints for this service.

Returns:
A map of command names to corresponding methods.

hasCommandPoints

public boolean hasCommandPoints()
Returns:
True iff this service has any Command endpoints.

getServiceName

public String getServiceName()
Returns:
The subject name of this service used for registering a MessageCallback.

isLocal

public boolean isLocal()
Returns:
True iff this is a Local service.

getDelegateClass

public abstract Class<?> getDelegateClass()
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 abstract boolean isCallback()
Returns:
True iff this is a type service with no command points, and this type is assignable to a MessageCallback.

getCallback

public abstract MessageCallback getCallback(Object delegateInstance)

Errai 3.0.1-SNAPSHOT

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