|
Thanks for your response. I maybe using this incorrectly. I noticed that this was not derived from Validator class but from Processor instead. so I changed my code to:
cont...
<field type="rule" align="right" variable="rmiport.value"> <spec txt=" RMIPort:" layout="N:5:5" set="0:1098"/> <processor class="com.izforge.izpack.panels.PortProcessor"> however it does not see to have made a difference. I think the code is not getting invoked at all. no matter what value I put in for the variable it accepts it. I even changed the PortProcessor name to a non-existing name and it still did the same behavior! What am I missing? In order for the processor to evaluate the field, you must add the resultFormat="processed" to the spec element like so:
<field type="rule" align="right" variable="rmiport.value"&rt; or this:
<field type="rule" align="right" variable="rmiport.value"> I fixed the problem by using my own portprocessor and catching io exception. The izpack PortProcessor even with resultFormat="processed" does not work for me.
<field type="rule" align="right" variable="RMI.port"> import java.io.IOException; import com.izforge.izpack.panels.ProcessingClient; public class PortProcessor implements Processor { public String process(ProcessingClient client) { int fieldCount = client.getNumFields(); System.out.println("Using: "host":"+port); return createReturn(fieldCount, host, Integer.toString(port)); private String createReturn(int fieldCount, String host, String port) { } The issue is rescheduled to 4.1.0 as it could not make it for the 4.0.1 cutoff.
This issue has been originally scheduled for inclusion in version 4.1.0, to be released on october 2nd 2008.
If you believe that it cannot be resolved on time, then could you please move it to 4.2.0? Otherwise, I would appreciate if you could give me a time frame for scheduling purposes Thanks a lot! |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
If the specified port is still available for the specified network address (defaulting to localhost) the port is accepted. If the specified port is not available the processor seeks an available port and returns that port.
In your case apparently a process is bound to the specified port for 'all available network interfaces'. In this case a socket can still be bound to localhost ('unbinding' localhost for the already running process).
If you need to validate for binding to 'all available network interfaces', you should include the host '0.0.0.0' (or '::' for IPv6) as a field for the ProcessingClient of the PortProcessor.