svn commit: rev 36080 - avalon/trunk/planet/facilities/console/impl/src/main/org/apache/avalon/facilities/console/impl
[email protected] 8 Aug 2004 07:58:13 -0000
| Newsgroups | gmane.comp.jakarta.avalon.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: niclas
Date: Sun Aug 8 00:58:12 2004
New Revision: 36080
Modified:
avalon/trunk/planet/facilities/console/impl/src/main/org/apache/avalon/facilities/console/impl/ConsoleImpl.java
Log:
Added that the localhost address is added by default.
Modified: avalon/trunk/planet/facilities/console/impl/src/main/org/apache/avalon/facilities/console/impl/ConsoleImpl.java
==============================================================================
--- avalon/trunk/planet/facilities/console/impl/src/main/org/apache/avalon/facilities/console/impl/ConsoleImpl.java (original)
+++ avalon/trunk/planet/facilities/console/impl/src/main/org/apache/avalon/facilities/console/impl/ConsoleImpl.java Sun Aug 8 00:58:12 2004
@@ -59,6 +59,7 @@
* <parameters>
* <parameter name="port" value="3333" />
* <parameter name="allow-deny" value="false" />
+ * <parameter name="local-allow" value="true" />
* <parameter name="welcome-text" value="type 'help' form more info." />
* </parameters>
* </pre>
@@ -66,6 +67,9 @@
* if the host does not exist in the deny list, otherwise it is not allowed
* unless the host exist in the allow list.
* </p>
+ * <p>If <i>local-allow</i> is true, the localhost/127.0.0.1 is added to the
+ * allow list. This is default, so one can connect without further parameterization
+ * or configuration.</p>
*
* <p>Configuration</p>
* <pre>
@@ -138,6 +142,7 @@
* <parameters>
* <parameter name="port" value="3333" />
* <parameter name="allow-deny" value="false" />
+ * <parameter name="local-allow" value="true" />
* <parameter name="welcome-text" value="type 'help' form more info." />
* </parameters>
* </pre>
@@ -148,6 +153,13 @@
m_Port = params.getParameterAsInteger( "port", 3333 );
m_Welcome = params.getParameter( "welcome-text", "type 'help' form more info." );
m_Allow = params.getParameterAsBoolean( "deny-allow", false );
+
+ boolean localAllow = params.getParameterAsBoolean( "allow-local", true );
+ if( localAllow )
+ {
+ InetAddress address = InetAddress.getByName( "127.0.0.1" );
+ m_Allows.add( address );
+ }
}
/**
@@ -171,6 +183,7 @@
* </connections>
* </configuration>
* </pre>
+ *
*/
public void configure( Configuration conf )
throws ConfigurationException