Package org.kohsuke.stapler.bind
Class Bound
java.lang.Object
org.kohsuke.stapler.bind.Bound
- All Implemented Interfaces:
HttpResponse
Handles to the object bound via
BoundObjectTable.
As HttpResponse, this object generates a redirect to the URL that it points to.- Author:
- Kohsuke Kawaguchi
- See Also:
-
MetaClass.buildDispatchers()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a collection of all JS bound methods of the target's type.final StringReturns a JavaScript expression which evaluates to a JavaScript proxy that talks back to the bound object that this handle represents.static StringgetProxyScript(String url, Class<?> clazz) static StringgetProxyScript(String url, String[] methods) Returns the Stapler proxy script for the specified URL and method namesfinal StringgetProxyScriptURL(String variableName) Returns the URL for the standalone proxy script of thisBound.static StringgetProxyScriptURL(String variableName, Bound bound) Returns the URL to the proxy script for the specifiedBound.abstract ObjectGets the bound object.abstract StringgetURL()The URL where the object is bound to.abstract voidrelease()Explicitly unbind this object.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.kohsuke.stapler.HttpResponse
generateResponse, generateResponse
-
Constructor Details
-
Bound
public Bound()
-
-
Method Details
-
release
public abstract void release()Explicitly unbind this object. The referenced object won't be bound to URL anymore. -
getURL
The URL where the object is bound to. This method starts with '/' and thus always absolute within the current web server. -
getTarget
Gets the bound object. -
getProxyScript
Returns a JavaScript expression which evaluates to a JavaScript proxy that talks back to the bound object that this handle represents. -
getProxyScriptURL
Returns the URL to the proxy script for the specifiedBound.- Parameters:
variableName- the variable to assign to the bound objectbound- the bound object, ornullif none.- Returns:
- the URL to the proxy script for the specified
Bound, starting with the context path
-
getProxyScriptURL
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
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
-
getProxyScript
-
getProxyScript
Returns the Stapler proxy script for the specified URL and method names- Parameters:
url- URL to proxied objectmethods- list of method names- Returns:
- the Stapler proxy script for the specified URL and method names
-