xmlBlaster 2.1.0 API

org.xmlBlaster.util.dispatch.plugins.prio
Class StatusConfiguration

java.lang.Object
  extended by org.xmlBlaster.util.dispatch.plugins.prio.StatusConfiguration

public final class StatusConfiguration
extends java.lang.Object

Holding the configuration of a specific status.

For example we hold such a subset of the configuration:

   <onStatus oid='_bandwidth.status' content='64k' connectionState='polling' defaultAction='destroy'>
     <action do='send'  ifPriority='7-9'/>
     <action do='queue'  ifPriority='2-6'/>
   </onStatus>


Field Summary
private  ConnectionStateEnum connectionState
           
private  java.lang.String content
           
private  DispatchAction defaultDispatchAction
           
private  DispatchAction[] dispatchActionArr
           
private static java.util.logging.Logger log
           
private  java.lang.String ME
           
private  java.lang.String oid
           
 
Constructor Summary
StatusConfiguration(Global glob, java.lang.String oid, java.lang.String content, ConnectionStateEnum connectionState, DispatchAction defaultAction)
           
 
Method Summary
 void addDispatchAction(java.lang.String priorityRange, DispatchAction action)
           
private  void check(ConnectionStateEnum connectionState, DispatchAction action)
           
 boolean defaultActionOnly()
          Checks if only "send" is configured (for performance tuning)
 ConnectionStateEnum getConnectionState()
           
 java.lang.String getContent()
          The content of the status message (white spaces are trimmed).
 DispatchAction getDefaultDispatchAction()
           
 DispatchAction getDispatchAction(PriorityEnum priority)
           
 java.lang.String getOid()
          The message oid containing the status information (white spaces are trimmed).
 void setConnectionState(ConnectionStateEnum connectionState)
           
private  void setContent(java.lang.String content)
           
private  void setOid(java.lang.String oid)
           
 java.lang.String toXml(java.lang.String extraOffset)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ME

private java.lang.String ME

log

private static java.util.logging.Logger log

dispatchActionArr

private final DispatchAction[] dispatchActionArr

defaultDispatchAction

private DispatchAction defaultDispatchAction

oid

private java.lang.String oid

content

private java.lang.String content

connectionState

private ConnectionStateEnum connectionState
Constructor Detail

StatusConfiguration

public StatusConfiguration(Global glob,
                           java.lang.String oid,
                           java.lang.String content,
                           ConnectionStateEnum connectionState,
                           DispatchAction defaultAction)
Throws:
java.lang.IllegalArgumentException - For invalid configuration
Method Detail

check

private void check(ConnectionStateEnum connectionState,
                   DispatchAction action)
            throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

setOid

private void setOid(java.lang.String oid)

getOid

public java.lang.String getOid()
The message oid containing the status information (white spaces are trimmed).


setContent

private void setContent(java.lang.String content)

getContent

public java.lang.String getContent()
The content of the status message (white spaces are trimmed). This is the status of the connection.


setConnectionState

public void setConnectionState(ConnectionStateEnum connectionState)

getConnectionState

public ConnectionStateEnum getConnectionState()

getDefaultDispatchAction

public DispatchAction getDefaultDispatchAction()

defaultActionOnly

public boolean defaultActionOnly()
Checks if only "send" is configured (for performance tuning)


addDispatchAction

public void addDispatchAction(java.lang.String priorityRange,
                              DispatchAction action)
Parameters:
priority - If null, the whole range 0-9 is assumed

getDispatchAction

public DispatchAction getDispatchAction(PriorityEnum priority)
Returns:
The desired action for the given priority, is never null

toXml

public java.lang.String toXml(java.lang.String extraOffset)

xmlBlaster 2.1.0 API

Copyright © 1999-2011 The xmlBlaster.org contributers.