|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.spicefactory.cinnamon.client.AbstractServiceChannel
public abstract class AbstractServiceChannel
Common base class for factories that create Cinnamon client proxies. Uses JDK dynamic proxies to dynamically implement the service interfaces.
| Constructor Summary | |
|---|---|
AbstractServiceChannel()
|
|
| Method Summary | ||
|---|---|---|
void |
configure()
Method that should be called once after all properties have been set on this instance but before any service instances will be created. |
|
protected abstract ConfigurationBuilder |
createBuilder(Resource resource)
Create a new ConfigurationBuilder instance for the specified Resource. |
|
|
createService(Class<T> serviceInterface,
String serviceName)
Creates a client service proxy that implements the specified service interface. |
|
CinnamonConfig |
getConfig()
Returns the Cinnamon configuration. |
|
Set<String> |
getHeaderNames()
Returns an unmodifiable Set containing all header names for this message. |
|
Object |
getHeaderValue(String name)
Returns the header value for the given name. |
|
String |
getServiceUrl()
Returns the service URL that client proxies should connect to. |
|
void |
removeHeader(String name)
Removes the header for the given name. |
|
void |
setConfigResource(Resource resource)
Sets the resource to load the Cinnamonn configuration from. |
|
void |
setHeader(String name,
Object value)
Sets a header for this message. |
|
void |
setServiceUrl(String serviceUrl)
Sets the service URL that client proxies should connect to. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractServiceChannel()
| Method Detail |
|---|
public void setConfigResource(Resource resource)
ServiceChannel
setConfigResource in interface ServiceChannelresource - the resource to load the Cinnamonn configuration frompublic void setServiceUrl(String serviceUrl)
ServiceChannel
setServiceUrl in interface ServiceChannelserviceUrl - the service URL that client proxies should connect topublic String getServiceUrl()
ServiceChannel
getServiceUrl in interface ServiceChannelpublic CinnamonConfig getConfig()
ServiceChannel
getConfig in interface ServiceChannelpublic void configure()
ServiceChannel
configure in interface ServiceChannel
public void setHeader(String name,
Object value)
ServiceChannel
setHeader in interface ServiceChannelpublic void removeHeader(String name)
ServiceChannel
removeHeader in interface ServiceChannelname - the name of the header to removepublic Set<String> getHeaderNames()
ServiceChannel
getHeaderNames in interface ServiceChannelpublic Object getHeaderValue(String name)
ServiceChannel
getHeaderValue in interface ServiceChannelname - the name of the header
protected abstract ConfigurationBuilder createBuilder(Resource resource)
resource - the resource to read configuration data from
public <T> T createService(Class<T> serviceInterface,
String serviceName)
ServiceChannel
createService in interface ServiceChannelserviceInterface - the service interfaceserviceName - the name of the service as specified in the Cinnamon configuration
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||