1 16 package org.apache.cocoon.components.thread; 17 18 import EDU.oswego.cs.dl.util.concurrent.Channel; 19 20 21 27 public class ChannelWrapper 28 implements Channel 29 { 30 32 33 private Channel m_channel; 34 35 37 42 public void setChannel( final Channel channel ) 43 { 44 m_channel = channel; 45 } 46 47 51 public boolean offer( final Object obj, 52 final long timeout ) 53 throws InterruptedException 54 { 55 return m_channel.offer( obj, timeout ); 56 } 57 58 61 public Object peek( ) 62 { 63 return m_channel.peek( ); 64 } 65 66 69 public Object poll( final long timeout ) 70 throws InterruptedException 71 { 72 return m_channel.poll( timeout ); 73 } 74 75 78 public void put( final Object obj ) 79 throws InterruptedException 80 { 81 m_channel.put( obj ); 82 } 83 84 87 public Object take( ) 88 throws InterruptedException 89 { 90 return m_channel.take( ); 91 } 92 } 93 | Popular Tags |