org.kohsuke.stapler.bind
Class BoundObjectTable

java.lang.Object
  extended by org.kohsuke.stapler.bind.BoundObjectTable
All Implemented Interfaces:
StaplerFallback

public class BoundObjectTable
extends Object
implements StaplerFallback

Objects exported and bound by JavaScript proxies. TODO: think about some kind of eviction strategy, beyond the session eviction. Maybe it's not necessary, I don't know.

Author:
Kohsuke Kawaguchi

Nested Class Summary
static class BoundObjectTable.Table
          Per-session table that remembers all the bound instances.
 
Field Summary
static boolean DEBUG_LOGGING
          True to activate debug logging of session fragments.
static String PREFIX
           
 
Constructor Summary
BoundObjectTable()
           
 
Method Summary
 Bound bind(Object o)
          Binds an object temporarily and returns its URL.
 Bound bindWeak(Object o)
          Binds an object temporarily and returns its URL.
 BoundObjectTable.Table getStaplerFallback()
          Returns the object that is further searched for processing web requests.
 BoundObjectTable.Table getTable()
          Explicit call to create the table if one doesn't exist yet.
 void releaseMe()
          Called from within the request handling of a bound object, to release the object explicitly.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PREFIX

public static final String PREFIX
See Also:
Constant Field Values

DEBUG_LOGGING

public static boolean DEBUG_LOGGING
True to activate debug logging of session fragments.

Constructor Detail

BoundObjectTable

public BoundObjectTable()
Method Detail

getStaplerFallback

public BoundObjectTable.Table getStaplerFallback()
Description copied from interface: StaplerFallback
Returns the object that is further searched for processing web requests.

Specified by:
getStaplerFallback in interface StaplerFallback
Returns:
If null or this is returned, stapler behaves as if the object didn't implement this interface (which means the request processing failes with 404.)

bind

public Bound bind(Object o)
Binds an object temporarily and returns its URL.


bindWeak

public Bound bindWeak(Object o)
Binds an object temporarily and returns its URL.


releaseMe

public void releaseMe()
Called from within the request handling of a bound object, to release the object explicitly.


getTable

public BoundObjectTable.Table getTable()
Explicit call to create the table if one doesn't exist yet.



Copyright © 2013. All Rights Reserved.