You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by ha...@apache.org on 2002/01/10 12:17:04 UTC
cvs commit: jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/server/impl NoClassRetriever.java
hammant 02/01/10 03:17:03
Modified: altrmi/src/java/org/apache/commons/altrmi/generator
PrimarySourceGenerator.java
Added: altrmi/src/conf MANIFEST.MF
altrmi/src/java/org/apache/commons/altrmi/server/impl
NoClassRetriever.java
Log:
manifest and codegen flexibility
Revision Changes Path
1.1 jakarta-commons-sandbox/altrmi/src/conf/MANIFEST.MF
Index: MANIFEST.MF
===================================================================
Extension-Name: commons-altrmi
Specification-Vendor: Apache Software Foundation
Specification-Version: 0.9
Implementation-Vendor: Apache Software Foundation
Implementation-Version: 0.9
1.2 +11 -5 jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/generator/PrimarySourceGenerator.java
Index: PrimarySourceGenerator.java
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/generator/PrimarySourceGenerator.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- PrimarySourceGenerator.java 9 Jan 2002 19:25:55 -0000 1.1
+++ PrimarySourceGenerator.java 10 Jan 2002 11:17:03 -0000 1.2
@@ -20,6 +20,7 @@
import java.io.FileOutputStream;
import java.io.FileNotFoundException;
import java.io.Serializable;
+import java.io.File;
/**
@@ -27,7 +28,7 @@
*
*
* @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
- * @version $Revision: 1.1 $
+ * @version $Revision: 1.2 $
*/
public class PrimarySourceGenerator extends AbstractMethodHandler {
@@ -93,9 +94,11 @@
// The lookupable service class source.
makeSource(beanOnly, "Main", mClassesOrInterfacesToExpose);
- for (int i = 0; i < mAdditionalFacades.length; i++) {
- String facade = mAdditionalFacades[i];
- makeSource(beanOnly, encodeClassName(facade), new String[] { facade } );
+ if ( mAdditionalFacades != null) {
+ for (int i = 0; i < mAdditionalFacades.length; i++) {
+ String facade = mAdditionalFacades[i];
+ makeSource(beanOnly, encodeClassName(facade), new String[] { facade } );
+ }
}
}
@@ -107,7 +110,7 @@
Vector methodsDone = new Vector();
try {
- mClassSource = new PrintWriter(new FileOutputStream(mGenDir + "\\AltrmiGenerated"
+ mClassSource = new PrintWriter(new FileOutputStream(mGenDir + File.separator + "AltrmiGenerated"
+ mGenName + "_" + name + ".java"));
} catch (FileNotFoundException e) {
e.printStackTrace();
@@ -348,6 +351,9 @@
}
private boolean isAdditionalFacade(String className) {
+ if (mAdditionalFacades == null) {
+ return false;
+ }
for (int p = 0; p < mAdditionalFacades.length; p++) {
if (className.equals(mAdditionalFacades[p])) {
return true;
1.1 jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/server/impl/NoClassRetriever.java
Index: NoClassRetriever.java
===================================================================
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE.txt file.
*/
package org.apache.commons.altrmi.server.impl;
import org.apache.commons.altrmi.server.AltrmiClassRetrievalException;
import org.apache.commons.altrmi.server.ClassRetriever;
/**
* Class NoClassRetriever
*
*
* @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
* @version $Revision: 1.1 $
*/
public class NoClassRetriever implements ClassRetriever {
/**
* Method getBytes
*
*
* @param publishedName
*
* @return
*
* @throws AltrmiClassRetrievalException
*
*/
public byte[] getBytes(String publishedName) throws AltrmiClassRetrievalException {
throw new AltrmiClassRetrievalException("This AltRMI server does not support class forwarding");
}
}
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>