com.thoughtworks.proxy.kit
Interface ObjectReference

All Known Implementing Classes:
SimpleReference

public interface ObjectReference

A way to refer to objects that are stored in "awkward" places (for example inside a HttpSession or ThreadLocal). This interface is typically implemented by someone integrating with an existing container.

Since:
0.2, 0.1 in package com.thoughtworks.proxy.toy.delegate
Author:
Joe Walnes

Method Summary
 Object get()
          Retrieve an actual reference to the object.
 void set(Object item)
          Assign an object to the reference.
 

Method Detail

get

Object get()
Retrieve an actual reference to the object. Returns null if the reference is not available or has not been populated yet.

Returns:
an actual reference to the object.
Since:
0.2, 0.1 in package com.thoughtworks.proxy.toy.delegate

set

void set(Object item)
Assign an object to the reference.

Parameters:
item - the object to assign to the reference. May be null.
Since:
0.2, 0.1 in package com.thoughtworks.proxy.toy.delegate