Package org.kohsuke.stapler.bind
Class Bound
- java.lang.Object
-
- org.kohsuke.stapler.bind.Bound
-
- All Implemented Interfaces:
HttpResponse
public abstract class Bound extends Object implements HttpResponse
Handles to the object bound viaBoundObjectTable
. AsHttpResponse
, this object generates a redirect to the URL that it points to.- Author:
- Kohsuke Kawaguchi
- See Also:
MetaClass.buildDispatchers()
-
-
Constructor Summary
Constructors Constructor Description Bound()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Set<String>
getBoundJavaScriptUrlNames()
Returns a collection of all JS bound methods of the target's type.String
getProxyScript()
Returns a JavaScript expression which evaluates to a JavaScript proxy that talks back to the bound object that this handle represents.static String
getProxyScript(String url, Class<?> clazz)
static String
getProxyScript(String url, String[] methods)
Returns the Stapler proxy script for the specified URL and method namesString
getProxyScriptURL(String variableName)
Returns the URL for the standalone proxy script of thisBound
.static String
getProxyScriptURL(String variableName, Bound bound)
Returns the URL to the proxy script for the specifiedBound
.abstract Object
getTarget()
Gets the bound object.abstract String
getURL()
The URL where the object is bound to.abstract void
release()
Explicitly unbind this object.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.kohsuke.stapler.HttpResponse
generateResponse
-
-
-
-
Method Detail
-
release
public abstract void release()
Explicitly unbind this object. The referenced object won't be bound to URL anymore.
-
getURL
public abstract String getURL()
The URL where the object is bound to. This method starts with '/' and thus always absolute within the current web server.
-
getTarget
public abstract Object getTarget()
Gets the bound object.
-
getProxyScript
public final String getProxyScript()
Returns a JavaScript expression which evaluates to a JavaScript proxy that talks back to the bound object that this handle represents.
-
getProxyScriptURL
public static String getProxyScriptURL(String variableName, Bound bound)
Returns the URL to the proxy script for the specifiedBound
.- Parameters:
variableName
- the variable to assign to the bound objectbound
- the bound object, ornull
if none.- Returns:
- the URL to the proxy script for the specified
Bound
, starting with the context path
-
getProxyScriptURL
public final String getProxyScriptURL(String variableName)
Returns the URL for the standalone proxy script of thisBound
.- Parameters:
variableName
- the name of the JS variable to assign- Returns:
- the URL for the standalone proxy script of this
Bound
, starting with the context path
-
getBoundJavaScriptUrlNames
public final Set<String> getBoundJavaScriptUrlNames()
Returns a collection of all JS bound methods of the target's type.- Returns:
- a collection of all JS bound methods of the target's type
-
-