Package com.thoughtworks.proxy.factory

Examples of com.thoughtworks.proxy.factory.StandardProxyFactory


        DataInput[] dataInputs = new DataInput[]{
                new DataInputStream(new ByteArrayInputStream(new byte[]{0, 'A', 0, 'n', 0, ' '})),
                new DataInputStream(new ByteArrayInputStream(new byte[]{
                        0, 'e', 0, 'x', 0, 'a', 0, 'm', 0, 'p', 0, 'l', 0, 'e'})),};
        DataInput dataInput = (DataInput)Failover.object(
                DataInput.class, new StandardProxyFactory(), dataInputs, IOException.class);
        StringBuffer buffer = new StringBuffer();
        try {
            while (buffer.append(dataInput.readChar()) != null)
                ;
        } catch (IOException e) {
View Full Code Here


     * implementation.
     *
     * @param type The assimilated type.
     */
    public Assimilating(final Class<?> type) {
        this(type, new StandardProxyFactory());
    }
View Full Code Here

        /**
         * {@inheritDoc} Returns a {@link StandardProxyFactory}.
         */
        public ProxyFactory getProxyFactory() {
            return new StandardProxyFactory();
        }
View Full Code Here

     * @param delegate The delegated {@link ComponentAdapter}.
     *
     */
    @SuppressWarnings("unchecked")
  public Assimilated(final Class<T> type, final ComponentAdapter delegate) {
        this(type, delegate, new StandardProxyFactory());
    }
View Full Code Here

     *
     * @param delegate The {@link ComponentAdapter} to delegate.
     * @throws PicoCompositionException Thrown if the component does not implement any interface.
     */
    public ThreadLocalized(final ComponentAdapter<T> delegate) throws PicoCompositionException {
        this(new Cached<T>(delegate, new ThreadLocalReference<Stored.Instance<T>>()), new StandardProxyFactory());
    }
View Full Code Here

    /**
     * Constructs a wrapping ThreadLocalizing, that ensures the usage of the ThreadLocal. The Proxy
     * instances are generated by the JDK.
     */
    public ThreadLocalizing() {
        this(new StandardProxyFactory());
    }
View Full Code Here

    /**
     * Constructs a wrapping ThreadLocalizing.
     * @param ensure {@link #ENSURE_THREAD_LOCALITY} or {@link #THREAD_ENSURES_LOCALITY}.
     */
    public ThreadLocalizing(final boolean ensure) {
        this(ensure, new StandardProxyFactory());
    }
View Full Code Here

* @author J&ouml;rg Schaible
*/
public class ProxyFactoryExample {

    public static void packageOverviewExample1() {
        ProxyFactory factory = new StandardProxyFactory();
        List proxy = (List)factory.createProxy(new Class[]{List.class}, new SimpleInvoker(new ArrayList()));
        proxy.add("Hello World");
        System.out.println("Size of list: " + proxy.size());
        System.out.println("First element of list: " + proxy.get(0));
    }
View Full Code Here

TOP

Related Classes of com.thoughtworks.proxy.factory.StandardProxyFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.