com.nexaweb.server.pushconnection.flushpolicies
Interface ConfigurableFlushPolicy

All Superinterfaces:
FlushPolicy

public interface ConfigurableFlushPolicy
extends FlushPolicy

This interface provides a configure() method to the FlushPolicy interface which allows Nexaweb Server to pass the configuration found in the nexaweb-client.xml file to each FlushPolicy class it loads.

When application developers write their own implementations of FlushPolicy, they can implement this interface if they wish to be configured using the same mechanism that the Nexaweb provided policies use.

The element passed to the configure() method is the <policy> element.

Example Configuration

   <policy>
      <rules>
         <match xpath="starts-with(/client-info/java-version, '1.4')" />
      </rules>		 
      <configuration class="com.yourcompany.YourPolicy">
         <your-configuration>
            .
            .
            .
         </your-configuration>
      </configuration>
   </policy>
 

For more information on how flush policies are configured see the documentation provided in nexaweb-client.xml as well as com.nexaweb.server.pushconnection.FlushPolicy class javadoc.


Method Summary
 void configure(Element policy)
          If this policy is being applied as a result of it appearing in the nexaweb session configuration, then this method will be called with the <policy> element containing its configuration.
 
Methods inherited from interface com.nexaweb.server.pushconnection.FlushPolicy
getFlushSizeInBytes, isStreamClosedOnFlush, onMessageSend
 

Method Detail

configure

public void configure(Element policy)
               throws ConfigurationException
If this policy is being applied as a result of it appearing in the nexaweb session configuration, then this method will be called with the <policy> element containing its configuration.

Parameters:
policy - The <policy> element which appears in the configuration.
Throws:
ConfigurationException - thrown if the passed in element does not correctly specify all the parameters necessary to configure a flush policy.


Copyright © 2005 Nexaweb Technologies, Inc. All Rights Reserved.