flex.messaging.config
Class ThrottleSettings

java.lang.Object
  extended by flex.messaging.config.ThrottleSettings

public class ThrottleSettings
extends Object

This configuration class is derived from optional properties that may be supplied in the <properties> section of a destination. It exists to capture properties related to message thottling in a way that simplifies the ThrottleManager's usage of the configuration.


Field Summary
static int POLICY_ERROR
          Integer value of error policy
static int POLICY_IGNORE
          Integer value of ignore policy
static int POLICY_NONE
          Integer value of no policy
static int POLICY_REPLACE
          Integer value of replace policy.
 
Constructor Summary
ThrottleSettings()
          Creates a ThrottleSettings instance with default settings.
 
Method Summary
 String getDestinationName()
          Returns the destination name for ThrottleSettings.
 int getInboundPolicy()
          Returns the inbound throttle policy.
 int getIncomingClientFrequency()
          Returns the incoming client frequency (max-client-frequency).
 int getIncomingDestinationFrequency()
          Returns the incoming destination frequency (max-frequency).
 int getOutboundPolicy()
          Returns the outbound throttle policy.
 int getOutgoingClientFrequency()
          Returns the outgoing client frequency (max-client-frequency).
 int getOutgoingDestinationFrequency()
          Returns the outgoing destination frequency (max-frequency).
 boolean isClientThrottleEnabled()
          Returns whether client throttling is enabled.
 boolean isDestinationThrottleEnabled()
          Returns whether destination throttling is enabled.
static int parsePolicy(String policy)
          Parses the throttle policy out of the given string.
 void setDestinationName(String destinationName)
          Sets the destination name for ThrottleSettings.
 void setInboundPolicy(int inPolicy)
          Sets inbound throttle policy.
 void setIncomingClientFrequency(int n)
          Sets the incoming client frequency (max-client-frequency).
 void setIncomingDestinationFrequency(int n)
          Sets the incoming destination frequency (max-frequency).
 void setOutboundPolicy(int outPolicy)
          Sets the outbound throttle policy.
 void setOutgoingClientFrequency(int n)
          Sets the outgoing client frequency (max-client-frequency).
 void setOutgoingDestinationFrequency(int n)
          Sets the outgoing destination frequency (max-frequency).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

POLICY_NONE

public static final int POLICY_NONE
Integer value of no policy

See Also:
Constant Field Values

POLICY_ERROR

public static final int POLICY_ERROR
Integer value of error policy

See Also:
Constant Field Values

POLICY_IGNORE

public static final int POLICY_IGNORE
Integer value of ignore policy

See Also:
Constant Field Values

POLICY_REPLACE

public static final int POLICY_REPLACE
Integer value of replace policy. Note that replace policy is currently not used, and functionally the same as ignore policy.

See Also:
Constant Field Values
Constructor Detail

ThrottleSettings

public ThrottleSettings()
Creates a ThrottleSettings instance with default settings.

Method Detail

parsePolicy

public static int parsePolicy(String policy)
Parses the throttle policy out of the given string.

Parameters:
policy - The string policy to parse.

isClientThrottleEnabled

public boolean isClientThrottleEnabled()
Returns whether client throttling is enabled.

Returns:
true if the incoming client frequency or outgoing client frequency is greater than zero; otherwise false.

isDestinationThrottleEnabled

public boolean isDestinationThrottleEnabled()
Returns whether destination throttling is enabled.

Returns:
true if incoming destination frequency or outgoing destination frequency is greater than zero; otherwise false.

getInboundPolicy

public int getInboundPolicy()
Returns the inbound throttle policy.

Returns:
the inbound throttle policy.

setInboundPolicy

public void setInboundPolicy(int inPolicy)
Sets inbound throttle policy. The inbound policy may be ERROR or IGNORE.

Parameters:
inPolicy - The inbound policy.

getOutboundPolicy

public int getOutboundPolicy()
Returns the outbound throttle policy.

Returns:
the outbound throttle policy.

setOutboundPolicy

public void setOutboundPolicy(int outPolicy)
Sets the outbound throttle policy. The outbound policy may be ERROR, IGNORE, or REPLACE. Note that replace policy is currently not used, and functionally the same as ignore policy.

Parameters:
outPolicy - The outbound policy.

getDestinationName

public String getDestinationName()
Returns the destination name for ThrottleSettings.

Returns:
the destination name for ThrottleSettings.

setDestinationName

public void setDestinationName(String destinationName)
Sets the destination name for ThrottleSettings. This is set automatically when NetworkSettings is assigned to a destination.

Parameters:
destinationName - The destination name.

getIncomingClientFrequency

public int getIncomingClientFrequency()
Returns the incoming client frequency (max-client-frequency).

Returns:
The incoming client frequency (max-client-frequency).

setIncomingClientFrequency

public void setIncomingClientFrequency(int n)
Sets the incoming client frequency (max-client-frequency). Optional and the default value is 0. Note that the incoming client frequency cannot be more than the incoming destination frequency.

Parameters:
n - The incoming client frequency.

getIncomingDestinationFrequency

public int getIncomingDestinationFrequency()
Returns the incoming destination frequency (max-frequency).

Returns:
The incoming destination frequency (max-frequency).

setIncomingDestinationFrequency

public void setIncomingDestinationFrequency(int n)
Sets the incoming destination frequency (max-frequency). Optional and the default value is 0. Note that the incoming destination frequency cannot be less than the incoming client frequency.

Parameters:
n - The incoming destination frequency.

getOutgoingClientFrequency

public int getOutgoingClientFrequency()
Returns the outgoing client frequency (max-client-frequency).

Returns:
The outgoing client frequency (max-client-frequency).

setOutgoingClientFrequency

public void setOutgoingClientFrequency(int n)
Sets the outgoing client frequency (max-client-frequency). Optional and the default value is 0. Note that the outgoing client frequency cannot be more than the outgoing destination frequency.

Parameters:
n - The outgoing client frequency.

getOutgoingDestinationFrequency

public int getOutgoingDestinationFrequency()
Returns the outgoing destination frequency (max-frequency).

Returns:
The outgoing destination frequency (max-frequency).

setOutgoingDestinationFrequency

public void setOutgoingDestinationFrequency(int n)
Sets the outgoing destination frequency (max-frequency). Optional and the default value is 0. Note that the outgoing destination frequency cannot be less than the outgoing client frequency.

Parameters:
n - The outgoing destination frequency.


Copyright © 2008 Adobe Systems Inc. All Rights Reserved.

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/blazeds/1/javadoc/flex/messaging/config/ThrottleSettings.html