1 9 package org.jboss.portal.server.output.cache; 10 11 import java.lang.ref.WeakReference ; 12 13 import org.jboss.portal.server.output.FragmentResult; 14 15 21 public class SoftTimedContent extends TimedContent 22 { 23 24 25 private final WeakReference content; 26 27 30 public SoftTimedContent(FragmentResult content, long expirationTimeMillis) throws IllegalArgumentException 31 { 32 super(expirationTimeMillis); 33 if (content == null) 34 { 35 throw new IllegalArgumentException ("Content must not be null"); 36 } 37 this.content = new WeakReference (content); 38 } 39 40 public FragmentResult getContent() 41 { 42 return (FragmentResult)content.get(); 43 } 44 } 45 | Popular Tags |