public class DistributedSoftwareServerRestlet
extends org.restlet.resource.ServerResource
Constructor and Description |
---|
DistributedSoftwareServerRestlet() |
Modifier and Type | Method and Description |
---|---|
static void |
addServer(String server)
Record the existence of a software server and the applications/tasks it provides.
|
static void |
checkServers()
Remove dead servers and their associated tasks.
|
String |
getApplications()
Get the applications available.
|
String |
getApplicationStack()
Get an icon representation of the available software.
|
String |
getApplicationTaskInputs(String alias,
String task)
Get the input formats supported by the given task.
|
String |
getApplicationTaskInputsOutputs(String alias,
String task)
Get the input and output formats supported by the given task.
|
String |
getApplicationTaskOutputs(String alias,
String task)
Get the output formats supported by the given task.
|
String |
getApplicationTasks(String alias)
Get the tasks available for the given application.
|
static Vector<Vector<String>> |
getEndpointCommaSeparatedValues(String url)
Query a restlet endpoint that responds with lines of comma separated values.
|
static Vector<String> |
getEndpointValues(String url)
Query a restlet endpoint that responds with a line separated text list of values.
|
String |
getForm()
Get a web form interface for this restful service.
|
String |
getForm(boolean POST_UPLOADS,
String selected_application,
boolean HIDE_APPLICATIONS)
Get a web form interface for this restful service.
|
String |
getNonBusyServer(String application,
String task,
String input,
String output)
Find a non-busy server that can perform the given task.
|
String |
getServers()
Get the software servers registered to this master service.
|
org.restlet.representation.Representation |
httpGetHandler() |
org.restlet.representation.Representation |
httpPostHandler(org.restlet.representation.Representation entity) |
static void |
main(String[] args)
Start the restful service.
|
void |
stop()
Stop the REST interface.
|
abort, commit, delete, delete, describeVariants, doCatch, doConditionalHandle, doError, doHandle, doHandle, doNegotiatedHandle, get, get, getAttribute, getInfo, getInfo, getOnSent, getPreferredVariant, getRole, getVariants, getVariants, handle, hasAnnotations, head, head, isAnnotated, isAutoCommitting, isCommitted, isConditional, isExisting, isInRole, isNegotiated, options, options, patch, patch, post, post, put, put, redirectPermanent, redirectPermanent, redirectSeeOther, redirectSeeOther, redirectTemporary, redirectTemporary, setAllowedMethods, setAnnotated, setAttribute, setAutoCommitting, setChallengeRequests, setCommitted, setConditional, setCookieSettings, setDimensions, setExisting, setLocationRef, setLocationRef, setNegotiated, setOnSent, setProxyChallengeRequests, setServerInfo, setStatus, setStatus, setStatus, setStatus, updateAllowedMethods, updateDimensions
doError, doInit, doRelease, getAllowedMethods, getApplication, getChallengeRequests, getChallengeResponse, getClientInfo, getConditions, getConnegService, getContext, getConverterService, getCookies, getCookieSettings, getDimensions, getHostRef, getLocationRef, getLogger, getMatrix, getMatrixValue, getMaxForwards, getMetadataService, getMethod, getOriginalRef, getProtocol, getProxyChallengeRequests, getProxyChallengeResponse, getQuery, getQueryValue, getRanges, getReference, getReferrerRef, getRequest, getRequestAttributes, getRequestCacheDirectives, getRequestEntity, getResponse, getResponseAttributes, getResponseCacheDirectives, getResponseEntity, getRootRef, getServerInfo, getStatus, getStatusService, init, isConfidential, isLoggable, release, setApplication, setQueryValue, setRequest, setResponse, toObject, toRepresentation, toString
public static void addServer(String server)
server
- a software serverpublic static void checkServers()
public String getServers()
public String getApplications()
public String getApplicationTasks(String alias)
alias
- the application aliaspublic String getApplicationTaskOutputs(String alias, String task)
alias
- the application aliastask
- the application taskpublic String getApplicationTaskInputs(String alias, String task)
alias
- the application aliastask
- the application taskpublic String getApplicationTaskInputsOutputs(String alias, String task)
alias
- the application aliastask
- the application taskpublic String getApplicationStack()
public String getForm(boolean POST_UPLOADS, String selected_application, boolean HIDE_APPLICATIONS)
POST_UPLOADS
- true if this form should use POST rather than GET for uploading filesselected_application
- the default applicationHIDE_APPLICATIONS
- true if applications menu should be hiddenpublic String getForm()
public String getNonBusyServer(String application, String task, String input, String output)
application
- the application to usetask
- the task to performinput
- the input formatoutput
- the output format@Get public org.restlet.representation.Representation httpGetHandler()
@Post public org.restlet.representation.Representation httpPostHandler(org.restlet.representation.Representation entity)
public void stop()
public static Vector<String> getEndpointValues(String url)
url
- the URL of the restlet endpoint to querypublic static Vector<Vector<String>> getEndpointCommaSeparatedValues(String url)
url
- the URL of the restlet endpoint to querypublic static void main(String[] args)
args
- the input argumentsCopyright © 2014. All rights reserved.