Modified: river/jtsk/modules/modularize/apache-river/river-services/reggie/reggie-dl/src/main/java/org/apache/river/reggie/proxy/ServiceType.java URL: http://svn.apache.org/viewvc/river/jtsk/modules/modularize/apache-river/river-services/reggie/reggie-dl/src/main/java/org/apache/river/reggie/proxy/ServiceType.java?rev=1879521&r1=1879520&r2=1879521&view=diff ============================================================================== --- river/jtsk/modules/modularize/apache-river/river-services/reggie/reggie-dl/src/main/java/org/apache/river/reggie/proxy/ServiceType.java (original) +++ river/jtsk/modules/modularize/apache-river/river-services/reggie/reggie-dl/src/main/java/org/apache/river/reggie/proxy/ServiceType.java Sun Jul 5 11:41:39 2020 @@ -1,311 +1,311 @@ -/* - * 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. - */ -package org.apache.river.reggie; - -import java.io.ByteArrayOutputStream; -import java.io.DataOutputStream; -import java.io.IOException; -import java.io.InvalidObjectException; -import java.io.ObjectInputStream; -import java.io.Serializable; -import java.lang.reflect.Proxy; -import java.rmi.MarshalException; -import java.rmi.UnmarshalException; -import java.security.DigestOutputStream; -import java.security.MessageDigest; -import java.security.NoSuchAlgorithmException; -import java.util.StringTokenizer; -import org.apache.river.proxy.CodebaseProvider; -import org.apache.river.proxy.MarshalledWrapper; - -/** - * A ServiceType is a descriptor for a class, packaged up for - * transmission between client-side proxies and the registrar server. - * Instances are never visible to clients, they are private to the - * communication between the proxies and the server. - * <p> - * This class only has a bare minimum of methods, to minimize - * the amount of code downloaded into clients. - * - * @author Sun Microsystems, Inc. - * - * @see ClassMapper - * see ClassResolver (org.apache.river.reggie.test.share.ClassResolver?) - */ -class ServiceType implements Serializable { - - private static final long serialVersionUID = 2L; - private static final ServiceType[] empty = {}; - - /** - * Class name. If the class is generated by java.lang.reflect.Proxy, - * then the name is of the form ";iface1;iface2;...;ifaceN". - * - * @serial - */ - private String name; - /** - * Hash for the type - * - * @serial - */ - protected long hash; - /** - * Descriptor for the superclass. - * - * @serial - */ - protected ServiceType superclass; - /** - * Descriptor for the interfaces. As a special case, interfaces is - * null for the descriptor for java.lang.Object, and non-null otherwise. - * This avoids carrying a boolean isInterface around. - * - * @serial - */ - protected ServiceType[] interfaces; - /** - * An instance containing only name, no supertype info. - * This is only used on the registrar side, to minimize the amount - * of info transmitted back to clients. - */ - protected transient ServiceType replacement; - /** - * Flag set to true if this instance was unmarshalled from an - * integrity-protected stream, or false otherwise - */ - private transient boolean integrity = false; - - /** Should only be called by ClassMapper */ - public ServiceType(Class clazz, - ServiceType superclass, - ServiceType[] interfaces) - throws MarshalException - { - if (!Proxy.isProxyClass(clazz)) { - name = clazz.getName(); - } else if (interfaces.length == 0) { - name = ";"; - } else { - StringBuffer buf = new StringBuffer(); - for (int i = 0; i < interfaces.length; i++) { - buf.append(';'); - buf.append(interfaces[i].getName()); - } - name = buf.toString(); - } - this.superclass = superclass; - if (clazz != Object.class) - this.interfaces = interfaces; - try { - computeHash(); - } catch (Exception e) { - throw new MarshalException("unable to calculate the type hash for " - + name, e); - } - } - - /** - * Constructor used for creating replacement instances, - * containing only name. - */ - private ServiceType(ServiceType stype) { - name = stype.name; - } - - /** - * Returns the name of this type - * @return the name of this type - */ - public String getName() { - return name; - } - - /** Return the superclass descriptor */ - public ServiceType getSuperclass() { - return superclass; - } - - /** Return the interfaces. The array is not a copy; do not modify it. */ - public ServiceType[] getInterfaces() { - if (interfaces != null) - return interfaces; - return empty; - } - - /** Return the replacement, if any, containing only name and rep. */ - public synchronized ServiceType getReplacement() { - if (replacement == null) - replacement = new ServiceType(this); - return replacement; - } - - /** - * Test if this isAssignableFrom any of the given interface types. - * Note ifaces cannot be null. - */ - private boolean isAssignableFrom(ServiceType[] ifaces) - { - for (int i = ifaces.length; --i >= 0; ) { - if (hash == ifaces[i].hash || - isAssignableFrom(ifaces[i].interfaces)) - return true; - } - return false; - } - - /** @see Class#isInterface */ - public boolean isInterface() { - return (superclass == null && interfaces != null); - } - - /** - * Returns true if this type is equal to <code>type</code> or if this type - * is equal to a superclass of <code>type</code>. - * - * @param cls Type to check if subclass of this class - * @return true if <code>type</code> is a subclass of this type, false - * otherwise - * @see java.lang.Class#isAssignableFrom - */ - public boolean isAssignableFrom(ServiceType cls) { - if (hash == cls.hash) - return true; - if (isInterface()) { - if (cls.interfaces != null && isAssignableFrom(cls.interfaces)) - return true; - for (ServiceType sup = cls.superclass; - sup != null && sup.interfaces != null; - sup = sup.superclass) - { - if (isAssignableFrom(sup.interfaces)) - return true; - } - } else { - for (ServiceType sup = cls.superclass; - sup != null; - sup = sup.superclass) - { - if (hash == sup.hash) - return true; - } - } - return false; - } - - /** - * Converts this descriptor to a Class instance, loading from codebase - * - * @param codebase String the codebase to load the class from - * @return Class the class this descriptor represents - */ - public Class toClass(String codebase) - throws IOException, ClassNotFoundException - { - if (name.charAt(0) != ';') { - return CodebaseProvider.loadClass( - codebase, name, null, integrity, null); - } - StringTokenizer st = new StringTokenizer(name, ";"); - String[] ifs = new String[st.countTokens()]; - for (int i = 0; i < ifs.length; i++) { - ifs[i] = st.nextToken(); - } - return CodebaseProvider.loadProxyClass( - codebase, ifs, null, integrity, null); - } - - /** - * Returns true if the object passed in is an instance of Type - * with the same type hash. Returns false otherwise. - * @param o object to compare this object against - * @return true if this object equals the object passed in; false - * otherwise. - */ - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof ServiceType)) - return false; - ServiceType t = (ServiceType) o; - return hash == t.hash; - } - - /** - * Return a hashcode for this type. - * @return int the hashcode for this type - */ - public int hashCode() { - return (int) (hash ^ (hash >>> 32)); - } - - /* Inherit javadoc */ - public String toString() { - return getClass() + "[name=" + getName() + "]"; - } - - /** - * Computes a SHA-1 digest from the hash of the superclass, if there - * is a superclass, followed by the name of this class, followed by - * the name and type for each field, if any, declared by this class and - * ordered alphabetically by field name. The first 8 bytes of the digest - * are used to form the 64-bit hash value for this type. - */ - private void computeHash() throws IOException, NoSuchAlgorithmException - { - hash = 0; - MessageDigest md = MessageDigest.getInstance("SHA"); - DataOutputStream out = new DataOutputStream( - new DigestOutputStream(new ByteArrayOutputStream(127),md)); - out.writeUTF(name); - out.flush(); - byte[] digest = md.digest(); - for (int i = Math.min(8, digest.length); --i >= 0; ) { - hash += ((long) (digest[i] & 0xFF)) << (i * 8); - } - } - - /** - * Samples integrity protection setting (if any) of the stream from which - * this instance is being deserialized. - */ - private void readObject(ObjectInputStream in) - throws IOException, ClassNotFoundException - { - in.defaultReadObject(); - if (name == null) - throw new InvalidObjectException("name cannot be null"); - integrity = MarshalledWrapper.integrityEnforced(in); - if (hash == 0) { - try { - computeHash(); - } catch (Exception e) { - throw new UnmarshalException("unable to calculate the type" - + " hash for " + name, e); - } - } - } - - /** - * Throws InvalidObjectException, since data for this class is required. - */ - private void readObjectNoData() throws InvalidObjectException { - throw new InvalidObjectException("no data"); - } - -} - +/* + * 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. + */ +package org.apache.river.reggie.proxy; + +import java.io.ByteArrayOutputStream; +import java.io.DataOutputStream; +import java.io.IOException; +import java.io.InvalidObjectException; +import java.io.ObjectInputStream; +import java.io.Serializable; +import java.lang.reflect.Proxy; +import java.rmi.MarshalException; +import java.rmi.UnmarshalException; +import java.security.DigestOutputStream; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.util.StringTokenizer; +import org.apache.river.proxy.CodebaseProvider; +import org.apache.river.proxy.MarshalledWrapper; + +/** + * A ServiceType is a descriptor for a class, packaged up for + * transmission between client-side proxies and the registrar server. + * Instances are never visible to clients, they are private to the + * communication between the proxies and the server. + * <p> + * This class only has a bare minimum of methods, to minimize + * the amount of code downloaded into clients. + * + * @author Sun Microsystems, Inc. + * + * @see ClassMapper + * see ClassResolver (org.apache.river.reggie.test.share.ClassResolver?) + */ +public class ServiceType implements Serializable { + + private static final long serialVersionUID = 2L; + private static final ServiceType[] empty = {}; + + /** + * Class name. If the class is generated by java.lang.reflect.Proxy, + * then the name is of the form ";iface1;iface2;...;ifaceN". + * + * @serial + */ + private String name; + /** + * Hash for the type + * + * @serial + */ + protected long hash; + /** + * Descriptor for the superclass. + * + * @serial + */ + protected ServiceType superclass; + /** + * Descriptor for the interfaces. As a special case, interfaces is + * null for the descriptor for java.lang.Object, and non-null otherwise. + * This avoids carrying a boolean isInterface around. + * + * @serial + */ + protected ServiceType[] interfaces; + /** + * An instance containing only name, no supertype info. + * This is only used on the registrar side, to minimize the amount + * of info transmitted back to clients. + */ + protected transient ServiceType replacement; + /** + * Flag set to true if this instance was unmarshalled from an + * integrity-protected stream, or false otherwise + */ + private transient boolean integrity = false; + + /** Should only be called by ClassMapper */ + public ServiceType(Class clazz, + ServiceType superclass, + ServiceType[] interfaces) + throws MarshalException + { + if (!Proxy.isProxyClass(clazz)) { + name = clazz.getName(); + } else if (interfaces.length == 0) { + name = ";"; + } else { + StringBuffer buf = new StringBuffer(); + for (int i = 0; i < interfaces.length; i++) { + buf.append(';'); + buf.append(interfaces[i].getName()); + } + name = buf.toString(); + } + this.superclass = superclass; + if (clazz != Object.class) + this.interfaces = interfaces; + try { + computeHash(); + } catch (Exception e) { + throw new MarshalException("unable to calculate the type hash for " + + name, e); + } + } + + /** + * Constructor used for creating replacement instances, + * containing only name. + */ + private ServiceType(ServiceType stype) { + name = stype.name; + } + + /** + * Returns the name of this type + * @return the name of this type + */ + public String getName() { + return name; + } + + /** Return the superclass descriptor */ + public ServiceType getSuperclass() { + return superclass; + } + + /** Return the interfaces. The array is not a copy; do not modify it. */ + public ServiceType[] getInterfaces() { + if (interfaces != null) + return interfaces; + return empty; + } + + /** Return the replacement, if any, containing only name and rep. */ + public synchronized ServiceType getReplacement() { + if (replacement == null) + replacement = new ServiceType(this); + return replacement; + } + + /** + * Test if this isAssignableFrom any of the given interface types. + * Note ifaces cannot be null. + */ + private boolean isAssignableFrom(ServiceType[] ifaces) + { + for (int i = ifaces.length; --i >= 0; ) { + if (hash == ifaces[i].hash || + isAssignableFrom(ifaces[i].interfaces)) + return true; + } + return false; + } + + /** @see Class#isInterface */ + public boolean isInterface() { + return (superclass == null && interfaces != null); + } + + /** + * Returns true if this type is equal to <code>type</code> or if this type + * is equal to a superclass of <code>type</code>. + * + * @param cls Type to check if subclass of this class + * @return true if <code>type</code> is a subclass of this type, false + * otherwise + * @see java.lang.Class#isAssignableFrom + */ + public boolean isAssignableFrom(ServiceType cls) { + if (hash == cls.hash) + return true; + if (isInterface()) { + if (cls.interfaces != null && isAssignableFrom(cls.interfaces)) + return true; + for (ServiceType sup = cls.superclass; + sup != null && sup.interfaces != null; + sup = sup.superclass) + { + if (isAssignableFrom(sup.interfaces)) + return true; + } + } else { + for (ServiceType sup = cls.superclass; + sup != null; + sup = sup.superclass) + { + if (hash == sup.hash) + return true; + } + } + return false; + } + + /** + * Converts this descriptor to a Class instance, loading from codebase + * + * @param codebase String the codebase to load the class from + * @return Class the class this descriptor represents + */ + public Class toClass(String codebase) + throws IOException, ClassNotFoundException + { + if (name.charAt(0) != ';') { + return CodebaseProvider.loadClass( + codebase, name, null, integrity, null); + } + StringTokenizer st = new StringTokenizer(name, ";"); + String[] ifs = new String[st.countTokens()]; + for (int i = 0; i < ifs.length; i++) { + ifs[i] = st.nextToken(); + } + return CodebaseProvider.loadProxyClass( + codebase, ifs, null, integrity, null); + } + + /** + * Returns true if the object passed in is an instance of Type + * with the same type hash. Returns false otherwise. + * @param o object to compare this object against + * @return true if this object equals the object passed in; false + * otherwise. + */ + public boolean equals(Object o) { + if (this == o) return true; + if (!(o instanceof ServiceType)) + return false; + ServiceType t = (ServiceType) o; + return hash == t.hash; + } + + /** + * Return a hashcode for this type. + * @return int the hashcode for this type + */ + public int hashCode() { + return (int) (hash ^ (hash >>> 32)); + } + + /* Inherit javadoc */ + public String toString() { + return getClass() + "[name=" + getName() + "]"; + } + + /** + * Computes a SHA-1 digest from the hash of the superclass, if there + * is a superclass, followed by the name of this class, followed by + * the name and type for each field, if any, declared by this class and + * ordered alphabetically by field name. The first 8 bytes of the digest + * are used to form the 64-bit hash value for this type. + */ + private void computeHash() throws IOException, NoSuchAlgorithmException + { + hash = 0; + MessageDigest md = MessageDigest.getInstance("SHA"); + DataOutputStream out = new DataOutputStream( + new DigestOutputStream(new ByteArrayOutputStream(127),md)); + out.writeUTF(name); + out.flush(); + byte[] digest = md.digest(); + for (int i = Math.min(8, digest.length); --i >= 0; ) { + hash += ((long) (digest[i] & 0xFF)) << (i * 8); + } + } + + /** + * Samples integrity protection setting (if any) of the stream from which + * this instance is being deserialized. + */ + private void readObject(ObjectInputStream in) + throws IOException, ClassNotFoundException + { + in.defaultReadObject(); + if (name == null) + throw new InvalidObjectException("name cannot be null"); + integrity = MarshalledWrapper.integrityEnforced(in); + if (hash == 0) { + try { + computeHash(); + } catch (Exception e) { + throw new UnmarshalException("unable to calculate the type" + + " hash for " + name, e); + } + } + } + + /** + * Throws InvalidObjectException, since data for this class is required. + */ + private void readObjectNoData() throws InvalidObjectException { + throw new InvalidObjectException("no data"); + } + +} +
Modified: river/jtsk/modules/modularize/apache-river/river-services/reggie/reggie-dl/src/main/java/org/apache/river/reggie/proxy/ServiceTypeBase.java URL: http://svn.apache.org/viewvc/river/jtsk/modules/modularize/apache-river/river-services/reggie/reggie-dl/src/main/java/org/apache/river/reggie/proxy/ServiceTypeBase.java?rev=1879521&r1=1879520&r2=1879521&view=diff ============================================================================== --- river/jtsk/modules/modularize/apache-river/river-services/reggie/reggie-dl/src/main/java/org/apache/river/reggie/proxy/ServiceTypeBase.java (original) +++ river/jtsk/modules/modularize/apache-river/river-services/reggie/reggie-dl/src/main/java/org/apache/river/reggie/proxy/ServiceTypeBase.java Sun Jul 5 11:41:39 2020 @@ -1,77 +1,77 @@ -/* - * 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. - */ -package org.apache.river.reggie; - -import java.io.Serializable; -import org.apache.river.proxy.CodebaseProvider; - -/** - * A ServiceType annotated with a codebase. - * - * @author Sun Microsystems, Inc. - * - */ -class ServiceTypeBase implements Serializable { - - private static final long serialVersionUID = 2L; - - /** - * The ServiceType. - * - * @serial - */ - public final ServiceType type; - /** - * The codebase. - * - * @serial - */ - public String codebase; - - /** Simple constructor */ - public ServiceTypeBase(ServiceType type, String codebase) { - this.type = type; - this.codebase = codebase; - } - - /** Sets the codebase to the codebase of the given class. */ - public void setCodebase(Class cls) { - codebase = CodebaseProvider.getClassAnnotation(cls); - } - - /** - * Converts an array of ServiceTypeBase to an array of Class. If a - * class cannot be loaded, it is left as null. - */ - public static Class[] toClass(ServiceTypeBase[] stypes) - { - Class[] classes = null; - if (stypes != null) { - classes = new Class[stypes.length]; - for (int i = stypes.length; --i >= 0; ) { - try { - ServiceTypeBase stype = stypes[i]; - classes[i] = stype.type.toClass(stype.codebase); - } catch (Throwable e) { - RegistrarProxy.handleException(e); - } - } - } - return classes; - } -} +/* + * 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. + */ +package org.apache.river.reggie.proxy; + +import java.io.Serializable; +import org.apache.river.proxy.CodebaseProvider; + +/** + * A ServiceType annotated with a codebase. + * + * @author Sun Microsystems, Inc. + * + */ +public class ServiceTypeBase implements Serializable { + + private static final long serialVersionUID = 2L; + + /** + * The ServiceType. + * + * @serial + */ + public final ServiceType type; + /** + * The codebase. + * + * @serial + */ + public String codebase; + + /** Simple constructor */ + public ServiceTypeBase(ServiceType type, String codebase) { + this.type = type; + this.codebase = codebase; + } + + /** Sets the codebase to the codebase of the given class. */ + public void setCodebase(Class cls) { + codebase = CodebaseProvider.getClassAnnotation(cls); + } + + /** + * Converts an array of ServiceTypeBase to an array of Class. If a + * class cannot be loaded, it is left as null. + */ + public static Class[] toClass(ServiceTypeBase[] stypes) + { + Class[] classes = null; + if (stypes != null) { + classes = new Class[stypes.length]; + for (int i = stypes.length; --i >= 0; ) { + try { + ServiceTypeBase stype = stypes[i]; + classes[i] = stype.type.toClass(stype.codebase); + } catch (Throwable e) { + RegistrarProxy.handleException(e); + } + } + } + return classes; + } +} Modified: river/jtsk/modules/modularize/apache-river/river-services/reggie/reggie-dl/src/main/java/org/apache/river/reggie/proxy/Template.java URL: http://svn.apache.org/viewvc/river/jtsk/modules/modularize/apache-river/river-services/reggie/reggie-dl/src/main/java/org/apache/river/reggie/proxy/Template.java?rev=1879521&r1=1879520&r2=1879521&view=diff ============================================================================== --- river/jtsk/modules/modularize/apache-river/river-services/reggie/reggie-dl/src/main/java/org/apache/river/reggie/proxy/Template.java (original) +++ river/jtsk/modules/modularize/apache-river/river-services/reggie/reggie-dl/src/main/java/org/apache/river/reggie/proxy/Template.java Sun Jul 5 11:41:39 2020 @@ -1,70 +1,70 @@ -/* - * 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. - */ -package org.apache.river.reggie; - -import java.io.Serializable; -import java.rmi.RemoteException; -import net.jini.core.lookup.ServiceID; -import net.jini.core.lookup.ServiceTemplate; - -/** - * A Template contains the fields of a ServiceTemplate packaged up for - * transmission between client-side proxies and the registrar server. - * Instances are never visible to clients, they are private to the - * communication between the proxies and the server. - * <p> - * This class only has a bare minimum of methods, to minimize - * the amount of code downloaded into clients. - * - * @author Sun Microsystems, Inc. - * - */ -class Template implements Serializable { - - private static final long serialVersionUID = 2L; - - /** - * ServiceTemplate.serviceID - * - * @serial - */ - public ServiceID serviceID; - /** - * ServiceTemplate.serviceTypes converted to ServiceTypes - * - * @serial - */ - public ServiceType[] serviceTypes; - /** - * ServiceTemplate.attributeSetTemplates converted to EntryReps - * - * @serial - */ - public EntryRep[] attributeSetTemplates; - - /** - * Converts a ServiceTemplate to a Template. Any exception that results - * is bundled up into a MarshalException. - */ - public Template(ServiceTemplate tmpl) throws RemoteException { - serviceID = tmpl.serviceID; - serviceTypes = ClassMapper.toServiceType(tmpl.serviceTypes); - attributeSetTemplates = - EntryRep.toEntryRep(tmpl.attributeSetTemplates, false); - } -} +/* + * 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. + */ +package org.apache.river.reggie.proxy; + +import java.io.Serializable; +import java.rmi.RemoteException; +import net.jini.core.lookup.ServiceID; +import net.jini.core.lookup.ServiceTemplate; + +/** + * A Template contains the fields of a ServiceTemplate packaged up for + * transmission between client-side proxies and the registrar server. + * Instances are never visible to clients, they are private to the + * communication between the proxies and the server. + * <p> + * This class only has a bare minimum of methods, to minimize + * the amount of code downloaded into clients. + * + * @author Sun Microsystems, Inc. + * + */ +public class Template implements Serializable { + + private static final long serialVersionUID = 2L; + + /** + * ServiceTemplate.serviceID + * + * @serial + */ + public ServiceID serviceID; + /** + * ServiceTemplate.serviceTypes converted to ServiceTypes + * + * @serial + */ + public ServiceType[] serviceTypes; + /** + * ServiceTemplate.attributeSetTemplates converted to EntryReps + * + * @serial + */ + public EntryRep[] attributeSetTemplates; + + /** + * Converts a ServiceTemplate to a Template. Any exception that results + * is bundled up into a MarshalException. + */ + public Template(ServiceTemplate tmpl) throws RemoteException { + serviceID = tmpl.serviceID; + serviceTypes = ClassMapper.toServiceType(tmpl.serviceTypes); + attributeSetTemplates = + EntryRep.toEntryRep(tmpl.attributeSetTemplates, false); + } +} Modified: river/jtsk/modules/modularize/apache-river/river-services/reggie/reggie-dl/src/main/java/org/apache/river/reggie/proxy/Util.java URL: http://svn.apache.org/viewvc/river/jtsk/modules/modularize/apache-river/river-services/reggie/reggie-dl/src/main/java/org/apache/river/reggie/proxy/Util.java?rev=1879521&r1=1879520&r2=1879521&view=diff ============================================================================== --- river/jtsk/modules/modularize/apache-river/river-services/reggie/reggie-dl/src/main/java/org/apache/river/reggie/proxy/Util.java (original) +++ river/jtsk/modules/modularize/apache-river/river-services/reggie/reggie-dl/src/main/java/org/apache/river/reggie/proxy/Util.java Sun Jul 5 11:41:39 2020 @@ -1,68 +1,68 @@ -/* - * 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. - */ -package org.apache.river.reggie; - -import java.lang.reflect.Method; -import java.util.logging.Level; -import java.util.logging.Logger; -import net.jini.core.lookup.ServiceID; - -/** - * Miscellaneous common utility methods. - * - * @author Sun Microsystems, Inc. - * - */ -class Util { - - /** - * Returns Method object for specified method, which should always exist. - */ - static Method getMethod(Class type, String name, Class[] paramTypes) { - try { - return type.getMethod(name, paramTypes); - } catch (NoSuchMethodException e) { - throw new AssertionError(e); - } - } - - /** - * Checks if the value of the given service ID to register conforms to the - * ServiceID specification, logging a message to the provided logger at the - * specified logging level if it doesn't. - */ - static void checkRegistrantServiceID(ServiceID serviceID, - Logger logger, - Level level) - { - if (logger.isLoggable(level)) { - int variant = - (int) (serviceID.getLeastSignificantBits() >> 62) & 0x3; - if (variant != 2) { - logger.log(level, "{0} has invalid variant {1}", - new Object[]{ serviceID, Integer.valueOf(variant) }); - } - int version = - (int) (serviceID.getMostSignificantBits() >> 12) & 0xF; - if (!(version == 1 || version == 4)) { - logger.log(level, "{0} has invalid version {1}", - new Object[]{ serviceID, Integer.valueOf(version) }); - } - } - } -} +/* + * 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. + */ +package org.apache.river.reggie.proxy; + +import java.lang.reflect.Method; +import java.util.logging.Level; +import java.util.logging.Logger; +import net.jini.core.lookup.ServiceID; + +/** + * Miscellaneous common utility methods. + * + * @author Sun Microsystems, Inc. + * + */ +public class Util { + + /** + * Returns Method object for specified method, which should always exist. + */ + static Method getMethod(Class type, String name, Class[] paramTypes) { + try { + return type.getMethod(name, paramTypes); + } catch (NoSuchMethodException e) { + throw new AssertionError(e); + } + } + + /** + * Checks if the value of the given service ID to register conforms to the + * ServiceID specification, logging a message to the provided logger at the + * specified logging level if it doesn't. + */ + public static void checkRegistrantServiceID(ServiceID serviceID, + Logger logger, + Level level) + { + if (logger.isLoggable(level)) { + int variant = + (int) (serviceID.getLeastSignificantBits() >> 62) & 0x3; + if (variant != 2) { + logger.log(level, "{0} has invalid variant {1}", + new Object[]{ serviceID, Integer.valueOf(variant) }); + } + int version = + (int) (serviceID.getMostSignificantBits() >> 12) & 0xF; + if (!(version == 1 || version == 4)) { + logger.log(level, "{0} has invalid version {1}", + new Object[]{ serviceID, Integer.valueOf(version) }); + } + } + } +} Modified: river/jtsk/modules/modularize/apache-river/river-services/reggie/reggie-service/pom.xml URL: http://svn.apache.org/viewvc/river/jtsk/modules/modularize/apache-river/river-services/reggie/reggie-service/pom.xml?rev=1879521&r1=1879520&r2=1879521&view=diff ============================================================================== --- river/jtsk/modules/modularize/apache-river/river-services/reggie/reggie-service/pom.xml (original) +++ river/jtsk/modules/modularize/apache-river/river-services/reggie/reggie-service/pom.xml Sun Jul 5 11:41:39 2020 @@ -1,44 +1,49 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -~ Copyright (C) 2014 the original author or authors. -~ -~ Licensed 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. ---> -<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.river</groupId> - <artifactId>reggie</artifactId> - <version>3.0-SNAPSHOT</version> - </parent> - - <groupId>org.apache.river.reggie</groupId> - <artifactId>reggie-service</artifactId> - <url>http://river.apache.org</url> - <name>Module :: Reggie Service Implementation</name> - - <dependencies> - <dependency> - <groupId>org.apache.river.reggie</groupId> - <artifactId>reggie-dl</artifactId> - <version>${project.version}</version> - </dependency> - - <dependency> - <groupId>org.apache.river</groupId> - <artifactId>river-lib</artifactId> - <version>${project.version}</version> - </dependency> - </dependencies> -</project> +<?xml version="1.0" encoding="UTF-8"?> +<!-- ~ Copyright (C) 2014 the original author or authors. ~ ~ Licensed 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. --> +<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.river</groupId> + <artifactId>reggie</artifactId> + <version>3.0-SNAPSHOT</version> + </parent> + + <groupId>org.apache.river.reggie</groupId> + <artifactId>reggie-service</artifactId> + <url>http://river.apache.org</url> + <name>Module :: Reggie Service Implementation</name> + + <dependencies> + <dependency> + <groupId>org.apache.river.reggie</groupId> + <artifactId>reggie-dl</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.apache.river</groupId> + <artifactId>river-logging</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.apache.river</groupId> + <artifactId>river-lib</artifactId> + <version>${project.version}</version> + </dependency> + + <dependency> + <groupId>org.apache.river</groupId> + <artifactId>river-activation</artifactId> + <version>${project.version}</version> + </dependency> + + </dependencies> +</project> Modified: river/jtsk/modules/modularize/apache-river/river-services/reggie/reggie-service/src/main/java/org/apache/river/reggie/PersistentRegistrarImpl.java URL: http://svn.apache.org/viewvc/river/jtsk/modules/modularize/apache-river/river-services/reggie/reggie-service/src/main/java/org/apache/river/reggie/PersistentRegistrarImpl.java?rev=1879521&r1=1879520&r2=1879521&view=diff ============================================================================== --- river/jtsk/modules/modularize/apache-river/river-services/reggie/reggie-service/src/main/java/org/apache/river/reggie/PersistentRegistrarImpl.java (original) +++ river/jtsk/modules/modularize/apache-river/river-services/reggie/reggie-service/src/main/java/org/apache/river/reggie/PersistentRegistrarImpl.java Sun Jul 5 11:41:39 2020 @@ -1,55 +1,55 @@ -/* - * 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. - */ - -package org.apache.river.reggie; - -import org.apache.river.start.LifeCycle; -import java.rmi.MarshalledObject; -import java.rmi.activation.ActivationID; -import net.jini.io.MarshalledInstance; - -/** - * Class for starting activatable and non-activatable persistent lookup - * services. - * - * @author Sun Microsystems, Inc. - */ -public class PersistentRegistrarImpl extends RegistrarImpl { - - /** - * Constructs a non-activatable PersistentRegistrarImpl based on a - * configuration obtained using the provided arguments. If lifeCycle is - * non-null, then its unregister method is invoked during service shutdown. - */ - protected PersistentRegistrarImpl(String[] configArgs, LifeCycle lifeCycle) - throws Exception - { - super(configArgs, null, true, lifeCycle); - } - - /** - * Constructs an activatable PersistentRegistrarImpl assigned - * the given activation ID, based on a configuration obtained using - * the provided marshalled string array. - */ - PersistentRegistrarImpl(ActivationID activationID, MarshalledObject data) - throws Exception - { - super((String[]) new MarshalledInstance(data).get(false), activationID, true, null); - } -} +/* + * 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. + */ + +package org.apache.river.reggie; + +import org.apache.river.start.lifecycle.LifeCycle; +import java.rmi.MarshalledObject; +import java.rmi.activation.ActivationID; +import net.jini.io.MarshalledInstance; + +/** + * Class for starting activatable and non-activatable persistent lookup + * services. + * + * @author Sun Microsystems, Inc. + */ +public class PersistentRegistrarImpl extends RegistrarImpl { + + /** + * Constructs a non-activatable PersistentRegistrarImpl based on a + * configuration obtained using the provided arguments. If lifeCycle is + * non-null, then its unregister method is invoked during service shutdown. + */ + protected PersistentRegistrarImpl(String[] configArgs, LifeCycle lifeCycle) + throws Exception + { + super(configArgs, null, true, lifeCycle); + } + + /** + * Constructs an activatable PersistentRegistrarImpl assigned + * the given activation ID, based on a configuration obtained using + * the provided marshalled string array. + */ + PersistentRegistrarImpl(ActivationID activationID, MarshalledObject data) + throws Exception + { + super((String[]) new MarshalledInstance(data).get(false), activationID, true, null); + } +} Modified: river/jtsk/modules/modularize/apache-river/river-services/reggie/reggie-service/src/main/java/org/apache/river/reggie/RegistrarImpl.java URL: http://svn.apache.org/viewvc/river/jtsk/modules/modularize/apache-river/river-services/reggie/reggie-service/src/main/java/org/apache/river/reggie/RegistrarImpl.java?rev=1879521&r1=1879520&r2=1879521&view=diff ============================================================================== --- river/jtsk/modules/modularize/apache-river/river-services/reggie/reggie-service/src/main/java/org/apache/river/reggie/RegistrarImpl.java (original) +++ river/jtsk/modules/modularize/apache-river/river-services/reggie/reggie-service/src/main/java/org/apache/river/reggie/RegistrarImpl.java Sun Jul 5 11:41:39 2020 @@ -34,7 +34,7 @@ import org.apache.river.lookup.entry.Bas import org.apache.river.proxy.MarshalledWrapper; import org.apache.river.reliableLog.LogHandler; import org.apache.river.reliableLog.ReliableLog; -import org.apache.river.start.LifeCycle; +import org.apache.river.start.lifecycle.LifeCycle; import org.apache.river.thread.InterruptedStatusThread; import org.apache.river.thread.InterruptedStatusThread.Interruptable; import org.apache.river.thread.ReadersWriter; @@ -151,6 +151,26 @@ import net.jini.security.proxytrust.Serv import org.apache.river.api.util.Startable; import org.apache.river.thread.NamedThreadFactory; import org.apache.river.thread.SynchronousExecutors; +import org.apache.river.reggie.proxy.Registrar; +import org.apache.river.reggie.proxy.AdminProxy; +import org.apache.river.reggie.proxy.EntryClass; +import org.apache.river.reggie.proxy.EntryRep; +import org.apache.river.reggie.proxy.Item; +import org.apache.river.reggie.proxy.EntryClassBase; +import org.apache.river.reggie.proxy.ProxyVerifier; +import org.apache.river.reggie.proxy.Matches; +import org.apache.river.reggie.proxy.RegistrarEvent; +import org.apache.river.reggie.proxy.RegistrarProxy; +import org.apache.river.reggie.proxy.EventLease; +import org.apache.river.reggie.proxy.Registration; +import org.apache.river.reggie.proxy.RenewResults; +import org.apache.river.reggie.proxy.ServiceLease; +import org.apache.river.reggie.proxy.ServiceType; +import org.apache.river.reggie.proxy.ServiceTypeBase; +import org.apache.river.reggie.proxy.Template; +import org.apache.river.reggie.proxy.Util; + + /** * Base server-side implementation of a lookup service, subclassed by Modified: river/jtsk/modules/modularize/apache-river/river-services/reggie/reggie-service/src/main/java/org/apache/river/reggie/TransientRegistrarImpl.java URL: http://svn.apache.org/viewvc/river/jtsk/modules/modularize/apache-river/river-services/reggie/reggie-service/src/main/java/org/apache/river/reggie/TransientRegistrarImpl.java?rev=1879521&r1=1879520&r2=1879521&view=diff ============================================================================== --- river/jtsk/modules/modularize/apache-river/river-services/reggie/reggie-service/src/main/java/org/apache/river/reggie/TransientRegistrarImpl.java (original) +++ river/jtsk/modules/modularize/apache-river/river-services/reggie/reggie-service/src/main/java/org/apache/river/reggie/TransientRegistrarImpl.java Sun Jul 5 11:41:39 2020 @@ -1,57 +1,57 @@ -/* - * 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. - */ - -package org.apache.river.reggie; - -import org.apache.river.start.LifeCycle; -import net.jini.config.Configuration; - -/** - * Class for starting transient lookup services. - * - * @author Sun Microsystems, Inc. - */ -public class TransientRegistrarImpl extends RegistrarImpl { - - /** - * Constructs a TransientRegistrarImpl based on a configuration obtained - * using the provided arguments. If lifeCycle is non-null, then its - * unregister method is invoked during service shutdown. - */ - protected TransientRegistrarImpl(String[] configArgs, LifeCycle lifeCycle) - throws Exception - { - super(configArgs, null, false, lifeCycle); - } - - /** - * Constructs a TransientRegistrarImpl based on the configuration argument - * If lifeCycle is non-null, then its - * unregister method is invoked during service shutdown. - * - * It has the new (Embedded)NonActivatableServiceDescriptor service signature. - * - * protected to signal it should be started via the ServiceStarter or derived. - */ - protected TransientRegistrarImpl(Configuration config, LifeCycle lifeCycle) - throws Exception - { - super(config, null, false, lifeCycle); - } - -} +/* + * 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. + */ + +package org.apache.river.reggie; + +import org.apache.river.start.lifecycle.LifeCycle; +import net.jini.config.Configuration; + +/** + * Class for starting transient lookup services. + * + * @author Sun Microsystems, Inc. + */ +public class TransientRegistrarImpl extends RegistrarImpl { + + /** + * Constructs a TransientRegistrarImpl based on a configuration obtained + * using the provided arguments. If lifeCycle is non-null, then its + * unregister method is invoked during service shutdown. + */ + protected TransientRegistrarImpl(String[] configArgs, LifeCycle lifeCycle) + throws Exception + { + super(configArgs, null, false, lifeCycle); + } + + /** + * Constructs a TransientRegistrarImpl based on the configuration argument + * If lifeCycle is non-null, then its + * unregister method is invoked during service shutdown. + * + * It has the new (Embedded)NonActivatableServiceDescriptor service signature. + * + * protected to signal it should be started via the ServiceStarter or derived. + */ + protected TransientRegistrarImpl(Configuration config, LifeCycle lifeCycle) + throws Exception + { + super(config, null, false, lifeCycle); + } + +} Modified: river/jtsk/modules/modularize/apache-river/river-start/pom.xml URL: http://svn.apache.org/viewvc/river/jtsk/modules/modularize/apache-river/river-start/pom.xml?rev=1879521&r1=1879520&r2=1879521&view=diff ============================================================================== --- river/jtsk/modules/modularize/apache-river/river-start/pom.xml (original) +++ river/jtsk/modules/modularize/apache-river/river-start/pom.xml Sun Jul 5 11:41:39 2020 @@ -1,81 +1,98 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -~ Copyright (C) 2014 the original author or authors. -~ -~ Licensed 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. ---> -<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" - xmlns="http://maven.apache.org/POM/4.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <modelVersion>4.0.0</modelVersion> - <parent> - <artifactId>river</artifactId> - <groupId>org.apache</groupId> - <version>3.0-SNAPSHOT</version> - </parent> - <groupId>org.apache.river</groupId> - <artifactId>river-start</artifactId> - <url>http://river.apache.org</url> - <name>Module :: River Service Starter</name> - <description>This executable JAR file is the primary entry point for the Service Starter. - It acts as both the class path for the container virtual machine (VM) for the Java platform - that executes non-activatable services, and as the setup VM for activatable services. - </description> - - <dependencies> - - <dependency> - <groupId>org.apache.river</groupId> - <artifactId>river-platform</artifactId> - <version>${project.version}</version> - </dependency> - - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> - <version>2.2</version> - <configuration> - <archive> - <manifestEntries> - <Main-Class>org.apache.river.start.ServiceStarter</Main-Class> - <Implementation-Version>${project.version}</Implementation-Version> - <Class-Path>river-platform.jar</Class-Path> - </manifestEntries> - </archive> - </configuration> - </plugin> - - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-source-plugin</artifactId> - <version>2.1.1</version> - <executions> - <execution> - <id>attach-sources</id> - <phase>verify</phase> - <goals> - <goal>jar-no-fork</goal> - </goals> - </execution> - </executions> - </plugin> - - </plugins> - </build> - - -</project> +<?xml version="1.0" encoding="UTF-8"?> +<!-- ~ Copyright (C) 2014 the original author or authors. ~ ~ Licensed 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. --> +<project + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" + xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <modelVersion>4.0.0</modelVersion> + <parent> + <artifactId>river</artifactId> + <groupId>org.apache</groupId> + <version>3.0-SNAPSHOT</version> + </parent> + <groupId>org.apache.river</groupId> + <artifactId>river-start</artifactId> + <url>http://river.apache.org</url> + <name>Module :: River Service Starter</name> + <description>This executable JAR file is the primary entry point for the Service Starter. + It acts as both the class path for the container virtual machine (VM) for the Java platform + that executes non-activatable services, and as the setup VM for activatable services. + </description> + + <dependencies> + + <dependency> + <groupId>org.apache.river</groupId> + <artifactId>river-platform</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.apache.river</groupId> + <artifactId>river-logging</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.apache.river</groupId> + <artifactId>river-pref-class-loader</artifactId> + <version>${project.version}</version> + </dependency> + + <dependency> + <groupId>org.apache.river</groupId> + <artifactId>river-dl</artifactId> + <version>${project.version}</version> + </dependency> + + <dependency> + <groupId>org.apache.river</groupId> + <artifactId>river-lib</artifactId> + <version>${project.version}</version> + </dependency> + + + </dependencies> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jar-plugin</artifactId> + <version>2.2</version> + <configuration> + <archive> + <manifestEntries> + <Main-Class>org.apache.river.start.ServiceStarter</Main-Class> + <Implementation-Version>${project.version}</Implementation-Version> + <Class-Path>river-platform.jar</Class-Path> + </manifestEntries> + </archive> + </configuration> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-source-plugin</artifactId> + <version>2.1.1</version> + <executions> + <execution> + <id>attach-sources</id> + <phase>verify</phase> + <goals> + <goal>jar-no-fork</goal> + </goals> + </execution> + </executions> + </plugin> + + </plugins> + </build> + + +</project> Modified: river/jtsk/modules/modularize/apache-river/river-ui-factory/pom.xml URL: http://svn.apache.org/viewvc/river/jtsk/modules/modularize/apache-river/river-ui-factory/pom.xml?rev=1879521&r1=1879520&r2=1879521&view=diff ============================================================================== --- river/jtsk/modules/modularize/apache-river/river-ui-factory/pom.xml (original) +++ river/jtsk/modules/modularize/apache-river/river-ui-factory/pom.xml Sun Jul 5 11:41:39 2020 @@ -1,127 +1,114 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -~ Copyright (C) 2014 the original author or authors. -~ -~ Licensed 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. ---> -<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/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.apache</groupId> - <artifactId>river</artifactId> - <version>3.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - - <groupId>org.apache.river</groupId> - <artifactId>river-ui-factory</artifactId> - <packaging>jar</packaging> - - <name>Module :: River Service DL Library UI Factory</name> - - <dependencies> - - <dependency> - <groupId>org.apache.river</groupId> - <artifactId>river-url-integrity</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.apache.river</groupId> - <artifactId>river-platform</artifactId> - <version>3.0-SNAPSHOT</version> - <type>jar</type> - </dependency> - <dependency> - <groupId>org.apache.river</groupId> - <artifactId>river-lib-dl</artifactId> - <version>3.0-SNAPSHOT</version> - <type>jar</type> - </dependency> - <dependency> - <groupId>${project.groupId}</groupId> - <artifactId>river-jeri</artifactId> - <version>${project.version}</version> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>biz.aQute.bnd</groupId> - <artifactId>bnd-maven-plugin</artifactId> - <executions> - <execution> - <goals> - <goal>bnd-process</goal> - </goals> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.owasp</groupId> - <artifactId>dependency-check-maven</artifactId> - <executions> - <execution> - <goals> - <goal>check</goal> - </goals> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-source-plugin</artifactId> - <version>2.1.1</version> - <executions> - <execution> - <id>attach-sources</id> - <phase>verify</phase> - <goals> - <goal>jar-no-fork</goal> - </goals> - </execution> - </executions> - </plugin> - <plugin> - <artifactId>maven-compiler-plugin</artifactId> - <version>2.3.2</version> - <configuration> - <source>1.5</source> - <target>1.5</target> - <optimize>true</optimize> - <encoding>UTF-8</encoding> - <meminitial>128m</meminitial> - <maxmem>1024m</maxmem> - </configuration> - </plugin> - <!--<plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>retrotranslator-maven-plugin</artifactId> - <version>1.0-alpha-4</version> - <executions> - <execution> - <goals> - <goal>translate-project</goal> - </goals> - <configuration> - <classifier>jdk14</classifier> - <attach>true</attach> - </configuration> - </execution> - </executions> - </plugin>--> - </plugins> - </build> -</project> +<?xml version="1.0" encoding="UTF-8"?> +<!-- ~ Copyright (C) 2014 the original author or authors. ~ ~ Licensed 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. --> +<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/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache</groupId> + <artifactId>river</artifactId> + <version>3.0-SNAPSHOT</version> + <relativePath>../pom.xml</relativePath> + </parent> + + <groupId>org.apache.river</groupId> + <artifactId>river-ui-factory</artifactId> + <packaging>jar</packaging> + + <name>Module :: River Service DL Library UI Factory</name> + + <dependencies> + <dependency> + <groupId>org.apache.river</groupId> + <artifactId>river-logging</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.apache.river</groupId> + <artifactId>river-url-integrity</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.apache.river</groupId> + <artifactId>river-platform</artifactId> + <version>3.0-SNAPSHOT</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.apache.river</groupId> + <artifactId>river-dl</artifactId> + <version>3.0-SNAPSHOT</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>river-jeri</artifactId> + <version>${project.version}</version> + </dependency> + </dependencies> + + <build> + <plugins> + <plugin> + <groupId>biz.aQute.bnd</groupId> + <artifactId>bnd-maven-plugin</artifactId> + <executions> + <execution> + <goals> + <goal>bnd-process</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.owasp</groupId> + <artifactId>dependency-check-maven</artifactId> + <executions> + <execution> + <goals> + <goal>check</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-source-plugin</artifactId> + <version>2.1.1</version> + <executions> + <execution> + <id>attach-sources</id> + <phase>verify</phase> + <goals> + <goal>jar-no-fork</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <artifactId>maven-compiler-plugin</artifactId> + <version>2.3.2</version> + <configuration> + <source>1.8</source> + <target>1.8</target> + <optimize>true</optimize> + <encoding>UTF-8</encoding> + <meminitial>128m</meminitial> + <maxmem>1024m</maxmem> + </configuration> + </plugin> + <!--<plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>retrotranslator-maven-plugin</artifactId> + <version>1.0-alpha-4</version> <executions> <execution> <goals> <goal>translate-project</goal> + </goals> <configuration> <classifier>jdk14</classifier> <attach>true</attach> + </configuration> </execution> </executions> </plugin> --> + </plugins> + </build> +</project> Modified: river/jtsk/modules/modularize/apache-river/river-url-integrity/pom.xml URL: http://svn.apache.org/viewvc/river/jtsk/modules/modularize/apache-river/river-url-integrity/pom.xml?rev=1879521&r1=1879520&r2=1879521&view=diff ============================================================================== --- river/jtsk/modules/modularize/apache-river/river-url-integrity/pom.xml (original) +++ river/jtsk/modules/modularize/apache-river/river-url-integrity/pom.xml Sun Jul 5 11:41:39 2020 @@ -1,209 +1,169 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -~ Copyright (C) 2014 the original author or authors. -~ -~ Licensed 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. ---> -<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/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.apache</groupId> - <artifactId>river</artifactId> - <version>3.0-SNAPSHOT</version> - </parent> - - <groupId>org.apache.river</groupId> - <artifactId>river-url-integrity</artifactId> - <packaging>jar</packaging> - - <name>Module :: River URL providers and Integrity</name> - <description>River URL provider and Integrity verifiers. - </description> - - <properties> - <high.scale.lib.version>1.0.3</high.scale.lib.version> - </properties> - - <dependencies> - - <dependency> - <groupId>org.apache.river</groupId> - <artifactId>river-platform</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>${project.groupId}</groupId> - <artifactId>river-resources</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>${project.groupId}</groupId> - <artifactId>river-jeri</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.6</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>biz.aQute.bnd</groupId> - <artifactId>biz.aQute.bnd.annotation</artifactId> - <version>3.3.0</version> - <scope>compile</scope> - </dependency> - - - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>biz.aQute.bnd</groupId> - <artifactId>bnd-maven-plugin</artifactId> - <executions> - <execution> - <goals> - <goal>bnd-process</goal> - </goals> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.owasp</groupId> - <artifactId>dependency-check-maven</artifactId> - <executions> - <execution> - <goals> - <goal>check</goal> - </goals> - </execution> - </executions> - </plugin> - <!--<plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> - <version>2.2</version> - <configuration> - <archive> - <manifestEntries> - <Implementation-Version>${project.version}</Implementation-Version> - <Class-Path>river-resources-${project.version}.jar high-scale-lib-${high.scale.lib.version}.jar</Class-Path> - </manifestEntries> - </archive> - </configuration> - </plugin>--> - - <!--<plugin> - <groupId>org.codehaus.gmaven</groupId> - <artifactId>gmaven-plugin</artifactId> - <configuration> - <providerSelection>${gmavenProviderSelection}</providerSelection> - <source/> - </configuration> - <executions> - <execution> - <goals> - <goal>generateStubs</goal> - <goal>compile</goal> - <goal>generateTestStubs</goal> - <goal>testCompile</goal> - </goals> - </execution> - </executions> - <dependencies> - <dependency> - <groupId>org.codehaus.groovy</groupId> - <artifactId>groovy-all</artifactId> - <version>${groovy.version}</version> - </dependency> - </dependencies> - </plugin>--> - - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-source-plugin</artifactId> - <version>2.1.1</version> - <executions> - <execution> - <id>attach-sources</id> - <phase>verify</phase> - <goals> - <goal>jar-no-fork</goal> - </goals> - </execution> - </executions> - </plugin> - <plugin> - <artifactId>maven-compiler-plugin</artifactId> - <version>2.3.2</version> - <configuration> - <source>1.5</source> - <profile>compact1</profile> - <target>1.5</target> - <debug>true</debug> - <optimize>true</optimize> - <encoding>UTF-8</encoding> - <meminitial>128m</meminitial> - <maxmem>1024m</maxmem> - </configuration> - </plugin> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>retrotranslator-maven-plugin</artifactId> - <version>1.0-alpha-4</version> - <executions> - <execution> - <goals> - <goal>translate-project</goal> - </goals> - <configuration> - <classifier>jdk14</classifier> - <attach>true</attach> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - </plugin> - </plugins> - </build> - - <reporting> - <plugins> - <plugin> - <artifactId>maven-javadoc-plugin</artifactId> - <configuration> -<!-- - <additionalDependencies> - <additionalDependency> - <groupId>org.apache.river</groupId> - <artifactId>river-lib</artifactId> - <version>${project.version}</version> - </additionalDependency> - <additionalDependency> - <groupId>org.apache.river</groupId> - <artifactId>river-lib-dl</artifactId> - <version>${project.version}</version> - </additionalDependency> - </additionalDependencies> ---> - </configuration> - </plugin> - </plugins> - </reporting> -</project> +<?xml version="1.0" encoding="UTF-8"?> +<!-- ~ Copyright (C) 2014 the original author or authors. ~ ~ Licensed 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. --> +<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/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache</groupId> + <artifactId>river</artifactId> + <version>3.0-SNAPSHOT</version> + </parent> + + <groupId>org.apache.river</groupId> + <artifactId>river-url-integrity</artifactId> + <packaging>jar</packaging> + + <name>Module :: River URL providers and Integrity</name> + <description>River URL provider and Integrity verifiers. + </description> + + <properties> + <high.scale.lib.version>1.0.3</high.scale.lib.version> + </properties> + + <dependencies> + <!-- <dependency> <groupId>org.apache.river</groupId> <artifactId>river-platform</artifactId> + <version>${project.version}</version> </dependency> --> + <dependency> + <groupId>org.apache.river</groupId> + <artifactId>river-logging</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>river-resources</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>river-jeri</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.6</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>biz.aQute.bnd</groupId> + <artifactId>biz.aQute.bnd.annotation</artifactId> + <version>3.3.0</version> + <scope>compile</scope> + </dependency> + + + </dependencies> + + <build> + <plugins> + <plugin> + <groupId>biz.aQute.bnd</groupId> + <artifactId>bnd-maven-plugin</artifactId> + <executions> + <execution> + <goals> + <goal>bnd-process</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.owasp</groupId> + <artifactId>dependency-check-maven</artifactId> + <executions> + <execution> + <goals> + <goal>check</goal> + </goals> + </execution> + </executions> + </plugin> + <!--<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> + <version>2.2</version> <configuration> <archive> <manifestEntries> <Implementation-Version>${project.version}</Implementation-Version> + <Class-Path>river-resources-${project.version}.jar high-scale-lib-${high.scale.lib.version}.jar</Class-Path> + </manifestEntries> </archive> </configuration> </plugin> --> + + <!--<plugin> <groupId>org.codehaus.gmaven</groupId> <artifactId>gmaven-plugin</artifactId> + <configuration> <providerSelection>${gmavenProviderSelection}</providerSelection> + <source/> </configuration> <executions> <execution> <goals> <goal>generateStubs</goal> + <goal>compile</goal> <goal>generateTestStubs</goal> <goal>testCompile</goal> + </goals> </execution> </executions> <dependencies> <dependency> <groupId>org.codehaus.groovy</groupId> + <artifactId>groovy-all</artifactId> <version>${groovy.version}</version> + </dependency> </dependencies> </plugin> --> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-source-plugin</artifactId> + <version>2.1.1</version> + <executions> + <execution> + <id>attach-sources</id> + <phase>verify</phase> + <goals> + <goal>jar-no-fork</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <artifactId>maven-compiler-plugin</artifactId> + <version>2.3.2</version> + <configuration> + <source>1.8</source> + <profile>compact1</profile> + <target>1.8</target> + <debug>true</debug> + <optimize>true</optimize> + <encoding>UTF-8</encoding> + <meminitial>128m</meminitial> + <maxmem>1024m</maxmem> + </configuration> + </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>retrotranslator-maven-plugin</artifactId> + <version>1.0-alpha-4</version> + <executions> + <execution> + <goals> + <goal>translate-project</goal> + </goals> + <configuration> + <classifier>jdk14</classifier> + <attach>true</attach> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + </plugin> + </plugins> + </build> + + <reporting> + <plugins> + <plugin> + <artifactId>maven-javadoc-plugin</artifactId> + <configuration> + <!-- <additionalDependencies> <additionalDependency> <groupId>org.apache.river</groupId> + <artifactId>river-lib</artifactId> <version>${project.version}</version> + </additionalDependency> <additionalDependency> <groupId>org.apache.river</groupId> + <artifactId>river-lib-dl</artifactId> <version>${project.version}</version> + </additionalDependency> </additionalDependencies> --> + </configuration> + </plugin> + </plugins> + </reporting> +</project>
