|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.extensions.webscripts.connector.AbstractConnector
public abstract class AbstractConnector
Abstract class for use by developers in building their own custom connectors. This provides basic implementations of most of the helper functions that simply call through to workhorse functions. The primary workhorse functions are the two call methods - one of which buffers response data onto the response object and the other which streams data from source to destination. Extending this class makes it easier for developers by removing most of the tedious stuff and letting them concentrate on the interesting functions.
Field Summary | |
---|---|
protected ConnectorSession |
connectorSession
|
protected RemoteConfigElement.ConnectorDescriptor |
descriptor
|
protected String |
endpoint
|
Constructor Summary | |
---|---|
protected |
AbstractConnector(RemoteConfigElement.ConnectorDescriptor descriptor,
String endpoint)
Instantiates a new abstract connector. |
Method Summary | |
---|---|
Response |
call(String uri)
Invokes a URI on a remote service. |
ConnectorSession |
getConnectorSession()
Returns the connector session |
Credentials |
getCredentials()
Returns the credents for this connector. |
String |
getEndpoint()
Returns the endpoint to which this connector connects. |
void |
setConnectorSession(ConnectorSession connectorSession)
Sets the connector session |
void |
setCredentials(Credentials credentials)
Binds Credentials to this connector. |
void |
setEndpoint(String endpoint)
Sets the endpoint. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.springframework.extensions.webscripts.connector.Connector |
---|
call, call, call, call |
Field Detail |
---|
protected String endpoint
protected RemoteConfigElement.ConnectorDescriptor descriptor
protected ConnectorSession connectorSession
Constructor Detail |
---|
protected AbstractConnector(RemoteConfigElement.ConnectorDescriptor descriptor, String endpoint)
descriptor
- the descriptorendpoint
- the endpointMethod Detail |
---|
public Response call(String uri)
Connector
call
in interface Connector
uri
- the uri
public void setCredentials(Credentials credentials)
Connector
setCredentials
in interface Connector
credentials
- the new credentialspublic Credentials getCredentials()
Connector
getCredentials
in interface Connector
public void setEndpoint(String endpoint)
Connector
setEndpoint
in interface Connector
endpoint
- the new endpointpublic String getEndpoint()
Connector
getEndpoint
in interface Connector
public void setConnectorSession(ConnectorSession connectorSession)
Connector
setConnectorSession
in interface Connector
public ConnectorSession getConnectorSession()
Connector
getConnectorSession
in interface Connector
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |