com.buglabs.services.ws
Class DefaultWSImplementation

java.lang.Object
  extended by com.buglabs.services.ws.DefaultWSImplementation
All Implemented Interfaces:
PublicWSProvider, PublicWSProvider2
Direct Known Subclasses:
DefaultWSImplementationWithParams

public class DefaultWSImplementation
extends java.lang.Object
implements PublicWSProvider2

A helper class to stub out WSImplementations.


Field Summary
 
Fields inherited from interface com.buglabs.services.ws.PublicWSProvider
DELETE, GET, PACKAGE_ID, POST, PUT
 
Constructor Summary
DefaultWSImplementation(java.lang.String publicName)
           
 
Method Summary
 PublicWSDefinition discover(int operation)
           
 IWSResponse execute(int operation, java.lang.String input)
          Execute a service.
 java.lang.String getDescription()
           
 java.lang.String getPublicName()
           
 void setPublicName(java.lang.String name)
          Set the name of the service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultWSImplementation

public DefaultWSImplementation(java.lang.String publicName)
Method Detail

getPublicName

public java.lang.String getPublicName()
Specified by:
getPublicName in interface PublicWSProvider
Returns:
Name that this service uses.

execute

public IWSResponse execute(int operation,
                           java.lang.String input)
Description copied from interface: PublicWSProvider
Execute a service. This is a proxy to a native OSGi style service.

Specified by:
execute in interface PublicWSProvider
Parameters:
operation - PublicWSProvider.GET, .PUT, .POST, .DELETE
Returns:

discover

public PublicWSDefinition discover(int operation)
Specified by:
discover in interface PublicWSProvider
Parameters:
operation - HTTP operation. See IPublicServiceProvider.GET, etc.
Returns:
The description of what the service requires and provides, or null of service does not support the passed operation.

getDescription

public java.lang.String getDescription()
Specified by:
getDescription in interface PublicWSProvider
Returns:
A brief description of the service.

setPublicName

public void setPublicName(java.lang.String name)
Description copied from interface: PublicWSProvider2
Set the name of the service. This can be done on registration.

Specified by:
setPublicName in interface PublicWSProvider2