org.springframework.extensions.webscripts.connector
Class AbstractClient

java.lang.Object
  extended by org.springframework.extensions.webscripts.connector.AbstractClient
All Implemented Interfaces:
Client
Direct Known Subclasses:
RemoteClient

public abstract class AbstractClient
extends Object
implements Client

Abstract base class for use by developers who wish to provide additional custom client implementations. A general purpose but very useful RemoteClient implementation is provided that should handle most HTTP related matters. Client objects manage state between the web script layer and the remote endpoint. They are "dumb" objects in the sense that they need to be set up and then fired off. Connector objects tell the Client objects what to do and when. They orchestrate the sequence of handshakes and so forth so that the end user or web script developer doesn't need to worry about the underlying mechanics of speaking to the endpoint.

Author:
muzquiano

Field Summary
protected  String endpoint
           
 
Constructor Summary
AbstractClient(String endpoint)
          Instantiates a new abstract client.
 
Method Summary
 String getEndpoint()
           
 URL getURL()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

endpoint

protected String endpoint
Constructor Detail

AbstractClient

public AbstractClient(String endpoint)
Instantiates a new abstract client.

Parameters:
endpoint - the endpoint
Method Detail

getEndpoint

public String getEndpoint()
Specified by:
getEndpoint in interface Client
Returns:
the Endpoint for this Client e.g. http://localhost:8080/alfresco/service

getURL

public URL getURL()
Specified by:
getURL in interface Client
Returns:
the Endpoint for the Client as a URL object


Copyright © 2009 SpringSource, Inc. All Rights Reserved.