Package uk.ac.starlink.topcat.interop
Class TopcatServer
java.lang.Object
uk.ac.starlink.topcat.interop.TopcatServer
Provides HTTP server functionality for TOPCAT.
This includes a web server for dynamically generated content and an
XML-RPC server for use with SAMP.
This class is a singleton.
- Since:
- 29 Aug 2008
- Author:
- Mark Taylor
-
Method Summary
Modifier and TypeMethodDescriptionaddResource
(String name, org.astrogrid.samp.httpd.ServerResource resource) Makes a resource available for retrieving from this internal HTTP server.static TopcatServer
Returns the sole instance of this class.org.astrogrid.samp.client.ClientProfile
Returns a SAMP client profile.Returns the URL corresponding to the classpath for the package uk.ac.starlink.topcat.boolean
Indicates whether this server can serve the resource with a given URL.void
removeResource
(URL url) Removes a resource from this server.
-
Method Details
-
getProfile
public org.astrogrid.samp.client.ClientProfile getProfile()Returns a SAMP client profile.- Returns:
- profile
-
addResource
Makes a resource available for retrieving from this internal HTTP server. Aname
may be supplied which will appear at the end of the URL, but this is just for cosmetic purposes. The URL at which the resource is available will provided as the return value.- Parameters:
name
- filename identifying the resourceresource
- resource to make available- Returns:
- URL at which
resource
can be found
-
removeResource
Removes a resource from this server.- Parameters:
url
- URL returned by a previous addResource call
-
getTopcatPackageUrl
Returns the URL corresponding to the classpath for the package uk.ac.starlink.topcat.- Returns:
- documentation URL
-
isFound
Indicates whether this server can serve the resource with a given URL.- Parameters:
url
- URL to enquire about- Returns:
- true if a request for
url
will complete with non-error status
-
getInstance
Returns the sole instance of this class.- Returns:
- instance
- Throws:
IOException
-