Skip to content
Permalink
Browse files
Merging changes done during 1.0 release work back into trunk.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/proxy/trunk@630456 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
jwcarman committed Feb 23, 2008
1 parent 5f6defa commit 4d5733d16cc12c5d1fc023bd80664c001f63e325
Showing 27 changed files with 596 additions and 18 deletions.
@@ -1,5 +1,5 @@
Apache Commons Proxy
Copyright 2006-2007 The Apache Software Foundation
Copyright 2005-2008 The Apache Software Foundation

This product includes software developed by
The Apache Software Foundation (http://www.apache.org/).
@@ -0,0 +1,31 @@
Apache Commons Proxy Package
Version 1.0
Release Notes


INTRODUCTION:

Apache Commons Proxy is a package of utility classes which facilitate the
creation of dynamic proxies in Java.

REQUIREMENTS:

JDK1.4+

NOTES:

*** This is the initial release ***


FEEDBACK:

Open source works best when you give feedback:
http://commons.apache.org/proxy/

Please direct all bug reports to JIRA
http://issues.apache.org/jira/browse/PROXY

Or subscribe to the commons-user mailing list (please prefix email subject with [proxy])
http://commons.apache.org/mail-lists.html

The Commons-Proxy Team
131 pom.xml
@@ -17,15 +17,17 @@
~ specific language governing permissions and limitations
~ under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.commons</groupId>
<artifactId>commons-parent</artifactId>
<version>7</version>
</parent>
<artifactId>commons-proxy</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.1-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>Commons Proxy</name>
<description>Java library for dynamic proxying</description>
<url>http://commons.apache.org/proxy/</url>
@@ -121,8 +123,23 @@
<tarLongFileMode>gnu</tarLongFileMode>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>1.2.1</version>
<extensions>true</extensions>
<configuration>
<excludeDependencies>true</excludeDependencies>
<instructions>
<_nouses>true</_nouses>
<Bundle-SymbolicName>org.apache.commons.proxy</Bundle-SymbolicName>
<Export-Package>org.apache.commons.*;version=${pom.version}</Export-Package>
</instructions>
</configuration>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>cglib</groupId>
@@ -202,15 +219,26 @@
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-changelog-plugin</artifactId>
<version>2.1</version>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<configLocation>checkstyle.xml</configLocation>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<artifactId>maven-javadoc-plugin</artifactId>

<configuration>
<configLocation>checkstyle.xml</configLocation>
<linksource>true</linksource>
<links>
<link>http://java.sun.com/j2se/1.3/docs/api/</link>
<link>http://ws.apache.org/xmlrpc/apidocs/</link>
<link>http://www.csg.is.titech.ac.jp/~chiba/javassist/html</link>
<link>http://aopalliance.sourceforge.net/doc/</link>
<link>http://gee.cs.oswego.edu/dl/classes/</link>
</links>
</configuration>

</plugin>
</plugins>
</reporting>
@@ -223,4 +251,95 @@
</site>
</distributionManagement>

<properties>
<maven.compile.source>1.4</maven.compile.source>
<maven.compile.target>1.4</maven.compile.target>
<releaseManager>${user.name}</releaseManager>
</properties>

<profiles>
<profile>
<id>rc</id>
<distributionManagement>
<site>
<id>stagingSite</id>
<name>Release Candidate Staging Site</name>
<url>
${commons.deployment.protocol}://people.apache.org/home/${releaseManager}/public_html/${artifactId}-${version}
</url>
</site>
</distributionManagement>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>attached</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-gpg-plugin</artifactId>
<configuration>
<passphrase>${gpg.passphrase}</passphrase>
</configuration>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>package</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<configuration>
<createChecksum>true</createChecksum>
</configuration>
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>create-source-jar</id>
<goals>
<goal>jar</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<!-- Pass these arguments to the deploy plugin. -->
<arguments>-Prc</arguments>
</configuration>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>create-javadoc-jar</id>
<goals>
<goal>jar</goal>
</goals>
<phase>package</phase>
<configuration>
<source>${maven.compile.source}</source>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>
@@ -27,8 +27,30 @@
*/
public interface Invocation
{
/**
* Returns the method being called.
* @return the method being called
*/
public Method getMethod();

/**
* Returns the arguments being passed to this method invocation. Changes in the elements of this array will be
* propagated to the recipient of this invocation.
*
* @return the arguments being passed to this method invocation
*/
public Object[] getArguments();

/**
* Returns the proxy object on which this invocation was invoked.
* @return the proxy object on which this invocation was invoked
*/
public Object getProxy();

/**
* Called in order to let the invocation proceed.
* @return the return value of the invocation
* @throws Throwable any exception or error that was thrown as a result of this invocation
*/
public Object proceed() throws Throwable;
}
@@ -0,0 +1,23 @@
<!--
~ Licensed to the Apache Software Foundation (ASF) under one or more
~ contributor license agreements. See the NOTICE file distributed with
~ this work for additional information regarding copyright ownership.
~ The ASF licenses this file to You under the Apache License, Version 2.0
~ (the "License"); you may not use this file except in compliance with
~ the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<html>
<body>
<p>
This package contains the exception classes used by the primary API.
</p>
</body>
</html>
@@ -0,0 +1,24 @@
<!--
~ Licensed to the Apache Software Foundation (ASF) under one or more
~ contributor license agreements. See the NOTICE file distributed with
~ this work for additional information regarding copyright ownership.
~ The ASF licenses this file to You under the Apache License, Version 2.0
~ (the "License"); you may not use this file except in compliance with
~ the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<html>
<body>
<p>
This package contains the <a href="http://cglib.sourceforge.net/">CGLIB</a>-based
<a href="../../ProxyFactory.html">ProxyFactory</a> implementation.
</p>
</body>
</html>
@@ -31,6 +31,10 @@
import java.util.WeakHashMap;

/**
* A <a href="http://www.jboss.org/products/javassist">Javassist</a>-based {@link Invocation} implementation. This
* class actually serves as the superclass for all <a href="http://www.jboss.org/products/javassist">Javassist</a>-based
* method invocations. Subclasses are dynamically created to deal with specific interface methods (they're hard-wired).
*
* @author James Carman
* @since 1.0
*/
@@ -137,7 +141,15 @@ private static Map getClassCache( ClassLoader classLoader )
return cache;
}

public synchronized static Class getMethodInvocationClass( ClassLoader classLoader,
/**
* Returns a method invocation class specifically coded to invoke the supplied interface method.
*
* @param classLoader the classloader to use
* @param interfaceMethod the interface method
* @return a method invocation class specifically coded to invoke the supplied interface method
* @throws CannotCompileException if a compilation error occurs
*/
synchronized static Class getMethodInvocationClass( ClassLoader classLoader,
Method interfaceMethod )
throws CannotCompileException
{

0 comments on commit 4d5733d

Please sign in to comment.