1 45 package org.exolab.jms.net.rmi; 46 47 import org.exolab.jms.net.connector.ResourceException; 48 import org.exolab.jms.net.connector.URIRequestInfo; 49 import org.exolab.jms.net.uri.URI; 50 import org.exolab.jms.net.util.Properties; 51 52 53 61 public class RMIRequestInfo extends URIRequestInfo { 62 63 66 private boolean _embedRegistry = true; 67 68 72 protected static final String EMBED_REGISTRY = "embedRegistry"; 73 74 75 80 public RMIRequestInfo(URI uri) { 81 super(uri); 82 } 83 84 91 public RMIRequestInfo(URI uri, Properties properties) 92 throws ResourceException { 93 super(uri); 94 setEmbedRegistry(properties.getBoolean(EMBED_REGISTRY, true)); 95 } 96 97 103 public void setEmbedRegistry(boolean embedded) { 104 _embedRegistry = embedded; 105 } 106 107 113 public boolean getEmbedRegistry() { 114 return _embedRegistry; 115 } 116 117 122 public void export(Properties properties) { 123 super.export(properties); 124 properties.set(EMBED_REGISTRY, getEmbedRegistry()); 125 } 126 127 134 public boolean equals(Object other) { 135 boolean equal = super.equals(other); 136 if (equal && other instanceof RMIRequestInfo) { 137 RMIRequestInfo info = (RMIRequestInfo) other; 138 if (_embedRegistry == info._embedRegistry) { 139 equal = true; 140 } 141 } else { 142 equal = false; 143 } 144 return equal; 145 } 146 147 } 148 | Popular Tags |