📄 complextype.html
字号:
prepended by all the parents names separated by slashes.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>Absolute name.</DL></DD></DL><HR><A NAME="getSettingsFromObject(java.lang.Object, java.lang.String)"><!-- --></A><H3>getSettingsFromObject</H3><PRE><A HREF="../../../../org/archive/crawler/settings/ComplexType.Context.html" title="class in org.archive.crawler.settings">ComplexType.Context</A> <B>getSettingsFromObject</B>(java.lang.Object o, java.lang.String attributeName)</PRE><DL><DD>Get settings object valid for a URI. <p/> This method takes an object, try to convert it into a <A HREF="../../../../org/archive/crawler/datamodel/CrawlURI.html" title="class in org.archive.crawler.datamodel"><CODE>CrawlURI</CODE></A> and then tries to get the settings object from it. If this fails, then the global settings object is returned. <p/> If the requested attribute is not set on this settings object it tries its parent until it gets a settings object where this attribute is set is found. If nothing is found, global settings is returned.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>o</CODE> - possible <A HREF="../../../../org/archive/crawler/datamodel/CrawlURI.html" title="class in org.archive.crawler.datamodel"><CODE>CrawlURI</CODE></A>.<DD><CODE>attributeName</CODE> - the attribute that should have a value set on the returned settings object.<DT><B>Returns:</B><DD>the settings object valid for the URI.</DL></DD></DL><HR><A NAME="getSettingsFromObject(java.lang.Object)"><!-- --></A><H3>getSettingsFromObject</H3><PRE><A HREF="../../../../org/archive/crawler/settings/ComplexType.Context.html" title="class in org.archive.crawler.settings">ComplexType.Context</A> <B>getSettingsFromObject</B>(java.lang.Object o)</PRE><DL><DD>Get settings object valid for a URI. This method takes an object, try to convert it into a <A HREF="../../../../org/archive/crawler/datamodel/CrawlURI.html" title="class in org.archive.crawler.datamodel"><CODE>CrawlURI</CODE></A> and then tries to get the settings object from it. If this fails, then the global settings object is returned.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>o</CODE> - possible <A HREF="../../../../org/archive/crawler/datamodel/CrawlURI.html" title="class in org.archive.crawler.datamodel"><CODE>CrawlURI</CODE></A>.<DT><B>Returns:</B><DD>the settings object valid for the URI.</DL></DD></DL><HR><A NAME="isOverridden(org.archive.crawler.settings.CrawlerSettings, java.lang.String)"><!-- --></A><H3>isOverridden</H3><PRE>public boolean <B>isOverridden</B>(<A HREF="../../../../org/archive/crawler/settings/CrawlerSettings.html" title="class in org.archive.crawler.settings">CrawlerSettings</A> settings, java.lang.String name) throws javax.management.AttributeNotFoundException</PRE><DL><DD>Returns true if an element is overridden for this settings object.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>settings</CODE> - the settings object to investigate.<DD><CODE>name</CODE> - the name of the element to check.<DT><B>Returns:</B><DD>true if element is overridden for this settings object, false if not set here or is first defined here.<DT><B>Throws:</B><DD><CODE>javax.management.AttributeNotFoundException</CODE> - if element doesn't exist.</DL></DD></DL><HR><A NAME="getAttribute(java.lang.String)"><!-- --></A><H3>getAttribute</H3><PRE>public java.lang.Object <B>getAttribute</B>(java.lang.String name) throws javax.management.AttributeNotFoundException, javax.management.MBeanException, javax.management.ReflectionException</PRE><DL><DD>Obtain the value of a specific attribute from the crawl order. If the attribute doesn't exist in the crawl order, the default value will be returned.<P><DD><DL><DT><B>Specified by:</B><DD><CODE>getAttribute</CODE> in interface <CODE>javax.management.DynamicMBean</CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the attribute to be retrieved.<DT><B>Returns:</B><DD>The value of the attribute retrieved.<DT><B>Throws:</B><DD><CODE>javax.management.AttributeNotFoundException</CODE><DD><CODE>javax.management.MBeanException</CODE><DD><CODE>javax.management.ReflectionException</CODE></DL></DD></DL><HR><A NAME="getAttribute(java.lang.String, org.archive.crawler.datamodel.CrawlURI)"><!-- --></A><H3>getAttribute</H3><PRE>public java.lang.Object <B>getAttribute</B>(java.lang.String name, <A HREF="../../../../org/archive/crawler/datamodel/CrawlURI.html" title="class in org.archive.crawler.datamodel">CrawlURI</A> uri) throws javax.management.AttributeNotFoundException</PRE><DL><DD>Obtain the value of a specific attribute that is valid for a specific CrawlURI. This method will try to get the attribute from the host settings valid for the CrawlURI. If it is not found it will traverse the settings up to the order and as a last resort deliver the default value. This is also the case if the CrawlURI is null or if the CrawlURI hasn't been assigned a CrawlServer.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the attribute to be retrieved.<DD><CODE>uri</CODE> - the CrawlURI that this attribute should be valid for.<DT><B>Returns:</B><DD>The value of the attribute retrieved.<DT><B>Throws:</B><DD><CODE>javax.management.AttributeNotFoundException</CODE><DT><B>See Also:</B><DD><A HREF="../../../../org/archive/crawler/settings/ComplexType.html#getAttribute(java.lang.Object, java.lang.String)"><CODE>getAttribute(Object settings, String name)</CODE></A></DL></DD></DL><HR><A NAME="getAttribute(java.lang.Object, java.lang.String)"><!-- --></A><H3>getAttribute</H3><PRE>public java.lang.Object <B>getAttribute</B>(java.lang.Object context, java.lang.String name) throws javax.management.AttributeNotFoundException</PRE><DL><DD>Obtain the value of a specific attribute that is valid for a specific CrawlerSettings object.<p> This method will first try to get a settings object from the supplied context, then try to look up the attribute from this settings object. If it is not found it will traverse the settings up to the order and as a last resort deliver the default value.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>context</CODE> - the object to get the settings from.<DD><CODE>name</CODE> - the name of the attribute to be retrieved.<DT><B>Returns:</B><DD>The value of the attribute retrieved.<DT><B>Throws:</B><DD><CODE>javax.management.AttributeNotFoundException</CODE><DT><B>See Also:</B><DD><A HREF="../../../../org/archive/crawler/settings/CrawlerSettings.html" title="class in org.archive.crawler.settings"><CODE>CrawlerSettings</CODE></A></DL></DD></DL><HR><A NAME="getUncheckedAttribute(java.lang.Object, java.lang.String)"><!-- --></A><H3>getUncheckedAttribute</H3><PRE>public java.lang.Object <B>getUncheckedAttribute</B>(java.lang.Object context, java.lang.String name)</PRE><DL><DD>Obtain the value of a specific attribute that is valid for a specific CrawlerSettings object. <p> This method will first try to get a settings object from the supplied context, then try to look up the attribute from this settings object. If it is not found it will traverse the settings up to the order and as a last resort deliver the default value. <p> The only difference from the <A HREF="../../../../org/archive/crawler/settings/ComplexType.html#getAttribute(java.lang.Object, java.lang.String)"><CODE>getAttribute(Object, String)</CODE></A>is that this method doesn't throw any checked exceptions. If an undefined attribute is requested from a ComplexType, it is concidered a bug and a runtime exception is thrown instead.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>context</CODE> - the object to get the settings from.<DD><CODE>name</CODE> - the name of the attribute to be retrieved.<DT><B>Returns:</B><DD>The value of the attribute retrieved.<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE><DT><B>See Also:</B><DD><A HREF="../../../../org/archive/crawler/settings/ComplexType.html#getAttribute(java.lang.Object, java.lang.String)"><CODE>getAttribute(Object, String)</CODE></A>, <A HREF="../../../../org/archive/crawler/settings/CrawlerSettings.html" title="class in org.archive.crawler.settings"><CODE>CrawlerSettings</CODE></A></DL></DD></DL><HR><A NAME="getLocalAttribute(org.archive.crawler.settings.CrawlerSettings, java.lang.String)"><!-- --></A><H3>getLocalAttribute</H3><PRE>public java.lang.Object <B>getLocalAttribute</B>(<A HREF="../../../../org/archive/crawler/settings/CrawlerSettings.html" title="class in org.archive.crawler.settings">CrawlerSettings</A> settings, java.lang.String name) throws javax.management.AttributeNotFoundException</PRE><DL><DD>Obtain the value of a specific attribute that is valid for a specific CrawlerSettings object. This method will try to get the attribute from the supplied host settings object. If it is not found it will return <code>null</code> and not try to investigate the hierarchy of settings.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>settings</CODE> - the CrawlerSettings object to search for this attribute.<DD><CODE>name</CODE> - the name of the attribute to be retrieved.<DT><B>Returns:</B><DD>The value of the attribute retrieved or null if its not set.<DT><B>Throws:</B><DD><CODE>javax.management.AttributeNotFoundException</CODE> - is thrown if the attribute doesn't exist.<DT><B>See Also:</B><DD><A HREF="../../../../org/archive/crawler/settings/CrawlerSettings.html" title="class in org.archive.crawler.settings"><CODE>CrawlerSettings</CODE></A></DL></DD></DL><HR><A NAME="setAttribute(javax.management.Attribute)"><!-- --></A><H3>setAttribute</H3><PRE>public final void <B>setAttribute</B>(javax.management.Attribute attribute) throws javax.management.AttributeNotFoundException, javax.management.InvalidAttributeValueException, javax.management.MBeanException, javax.management.ReflectionException</PRE><DL><DD>Set the value of a specific attribute of the ComplexType. This method sets the specific attribute for the order file.<P><DD><DL><DT><B>Specified by:</B><DD><CODE>setAttribute</CODE> in interface <CODE>javax.management.DynamicMBean</CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>attribute</CODE> - The identification of the attribute to be set and the value it is to be set to.<DT><B>Throws:</B><DD><CODE>javax.management.AttributeNotFoundException</CODE> - is thrown if there is no attribute with this name.<DD><CODE>javax.management.InvalidAttributeValueException</CODE> - is thrown if the attribute is of wrong type and cannot be converted to the right type.<DD><CODE>javax.management.MBeanException</CODE> - this is to conform to the MBean specification, but this exception is never thrown, though this might change in the future.<DD><CODE>javax.management.ReflectionException</CODE> - this is to conform to the MBean specification, but this exception is never thrown, though this might change in the future.<DT><B>See Also:</B><DD><CODE>DynamicMBean.setAttribute(javax.management.Attribute)</CODE></DL></DD></DL><HR><A NAME="setAttribute(org.archive.crawler.settings.CrawlerSettings, javax.management.Attribute)"><!-- --></A><H3>setAttribute</H3><PRE>public final void <B>setAttribute</B>(<A HREF="../../../../org/archive/crawler/settings/CrawlerSettings.html" title="class in org.archive.crawler.settings">CrawlerSettings</A> settings, javax.management.Attribute attribute) throws javax.management.InvalidAttributeValueException, javax.management.AttributeNotFoundException</PRE><DL><DD>Set the value of a specific attribute of the ComplexType. This method is an extension to the Dynamic MBean specification so that it is possible to set the value for a CrawlerSettings object other than the settings object representing the order.<P>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -