com.latencybusters.lbm
Class LBMContextAttributes

java.lang.Object
  extended by java.util.Dictionary<K,V>
      extended by java.util.Hashtable<java.lang.Object,java.lang.Object>
          extended by java.util.Properties
              extended by com.latencybusters.lbm.LBMContextAttributes
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.Object,java.lang.Object>

public class LBMContextAttributes
extends java.util.Properties

Encapsulates the set of default LBM context attributes.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.Properties
defaults
 
Constructor Summary
LBMContextAttributes()
          Create and fill an LBMContextAttributes object with the current default values
LBMContextAttributes(java.lang.String contextName)
          Create and fill an LBMContextAttributes object with the current default values for the given context name.
 
Method Summary
 void clearSourceNotification()
          Clear the currently stored source notification callback and token
 void disableSourceNotification()
          Disable new source notifications.
 void dispose()
          Free memory associated with this set of attributes.
 LBMConfigOption[] dumpAttributeList()
          Returns an array of LBMConfigOptions.
 void enableSourceNotification()
          Enable new source notifications.
protected  void finalize()
           
 java.lang.Object getRcvLivenessClientd()
           
 UMEReceiverLivenessCreationCallback getRcvLivenessCreateCB()
           
 UMEReceiverLivenessDeletionCallback getRcvLivenessDeleteCB()
           
 java.lang.String getValue(java.lang.String attributeName)
          Returns the current value of an attribute from this set of context attributes.
 void load(java.io.InputStream inStream)
          Reads a property (attribute) list (key and element pairs) from the input stream.
 void setContextEventCallback(LBMContextEventCallback cb)
          Set the context event callback for an LBMContext.
 void setContextEventCallback(LBMContextEventCallback cb, LBMEventQueue evq)
          Set the context event callback for an LBMContext and associated callback object.
 void setContextEventCallback(LBMContextEventCallback cb, java.lang.Object cbArg)
          Set the context event callback for an LBMContext and associated callback object.
 void setContextEventCallback(LBMContextEventCallback cb, java.lang.Object cbArg, LBMEventQueue evq)
          Set the context event callback for an LBMContext and associated callback object.
 void setContextSourceEventCallback(LBMContextSourceEventCallback cb)
          Set the context-level source event callback for an LBMContext.
 void setContextSourceEventCallback(LBMContextSourceEventCallback cb, LBMEventQueue evq)
          Set the context-level source event callback for an LBMContext and associated callback object.
 void setContextSourceEventCallback(LBMContextSourceEventCallback cb, java.lang.Object cbArg)
          Set the context-level source event callback for an LBMContext and associated callback object.
 void setContextSourceEventCallback(LBMContextSourceEventCallback cb, java.lang.Object cbArg, LBMEventQueue evq)
          Set the context-level source event callback for an LBMContext and associated callback object.
 void setFromXml(java.lang.String contextName)
          Fill an LBMContextAttributes object with the default values for the given context name specified by the XML configuration.
 void setImmediateMessageCallback(LBMImmediateMessageCallback cb)
          Set (and enable) the context callback for topic-less immediate mode messages.
 void setImmediateMessageCallback(LBMImmediateMessageCallback cb, LBMEventQueue evq)
          Set (and enable) the context callback for topic-less immediate mode messages.
 void setImmediateMessageCallback(LBMImmediateMessageCallback cb, java.lang.Object cbArg)
          Set (and enable) the context callback for topic-less immediate mode messages.
 void setImmediateMessageCallback(LBMImmediateMessageCallback cb, java.lang.Object cbArg, LBMEventQueue evq)
          Set (and enable) the context callback for topic-less immediate mode messages.
 void setObjectRecycler(LBMObjectRecyclerBase objRec, java.lang.Object objRecCbArg)
          Set the LBM object recycler that can be used by the context to reuse LBMMessage objects as well as LBM Context/Receiver/Source Statistics objects.
 java.lang.Object setProperty(java.lang.String attributeName, java.lang.String attributeValue)
          Set the current value of an attribute in this set of context attributes.
 void setReceiverLivenessNotificationCallbacks(UMEReceiverLivenessCreationCallback creationCb, UMEReceiverLivenessDeletionCallback deletionCb, java.lang.Object cbArg)
          Register callbacks for new receiver liveness notifications and receiver deletion notifications.
 void setSourceCostCallback(LBMSourceCostCallback cb)
          Set the source cost callback function for an LBMContext, which is an application callback to evaluate the cost of a newly discovered source
 void setSourceCostCallback(LBMSourceCostCallback cb, java.lang.Object cbArg)
          Set the source cost callback function for an LBMContext, which is an application callback to evaluate the cost of a newly discovered source
 void setSourceNotification(LBMSourceNotification cb, java.lang.Object cbarg)
          Set the callback and token to be used for source notifications.
 void setValue(java.lang.String attributeName, java.lang.String attributeValue)
          Set the current value of an attribute in this set of context attributes.
 
Methods inherited from class java.util.Properties
getProperty, getProperty, list, list, load, loadFromXML, propertyNames, save, store, store, storeToXML, storeToXML, stringPropertyNames
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LBMContextAttributes

public LBMContextAttributes(java.lang.String contextName)
                     throws LBMException
Create and fill an LBMContextAttributes object with the current default values for the given context name.

Parameters:
contextName - Context name string. Is written into the attributes object.
Throws:
LBMException - if the contextName is not permitted by the configuration or other operational failure.

LBMContextAttributes

public LBMContextAttributes()
                     throws LBMException
Create and fill an LBMContextAttributes object with the current default values

Throws:
LBMException
Method Detail

setFromXml

public void setFromXml(java.lang.String contextName)
                throws LBMException
Fill an LBMContextAttributes object with the default values for the given context name specified by the XML configuration.

Parameters:
contextName - Context name string. Is written into the attributes object.
Throws:
LBMException - if the contextName is not permitted by the configuration or other operational failure.

finalize

protected void finalize()
Overrides:
finalize in class java.lang.Object

dispose

public void dispose()
Free memory associated with this set of attributes.


dumpAttributeList

public LBMConfigOption[] dumpAttributeList()
Returns an array of LBMConfigOptions.

Returns:
Array of LBMConfigOption

getValue

public java.lang.String getValue(java.lang.String attributeName)
                          throws LBMException
Returns the current value of an attribute from this set of context attributes.

Parameters:
attributeName - Name of the attribute to retrieve
Returns:
Value corresponding to the specified attribute name
Throws:
LBMException - if attributeName is not a valid attribute.

setValue

public void setValue(java.lang.String attributeName,
                     java.lang.String attributeValue)
              throws LBMException
Set the current value of an attribute in this set of context attributes. Note that this method bypasses the property list. As such no attributes configured using this method will appear in the property list.

Parameters:
attributeName - Name of the attribute to set
attributeValue - New attribute value
Throws:
LBMException - if attributeName is not a valid attribute, or attributeValue is not a valid value for attributeName.
See Also:
setProperty(java.lang.String, java.lang.String)

setProperty

public java.lang.Object setProperty(java.lang.String attributeName,
                                    java.lang.String attributeValue)
Set the current value of an attribute in this set of context attributes.

Overrides:
setProperty in class java.util.Properties
Parameters:
attributeName - Name of the attribute to set
attributeValue - New attribute value
Throws:
LBMRuntimeException - if attributeName is not a valid attribute, or attributeValue is not a valid value for attributeName.

load

public void load(java.io.InputStream inStream)
          throws java.io.IOException
Reads a property (attribute) list (key and element pairs) from the input stream.

Overrides:
load in class java.util.Properties
Parameters:
inStream - Input stream of bytes
Throws:
java.io.IOException - if any I/O error occurs.
LBMRuntimeException - if any invalid attribute is detected in inStream.

setObjectRecycler

public void setObjectRecycler(LBMObjectRecyclerBase objRec,
                              java.lang.Object objRecCbArg)
Set the LBM object recycler that can be used by the context to reuse LBMMessage objects as well as LBM Context/Receiver/Source Statistics objects.

Parameters:
objRec - an LBM object recycler that will be called when objects need to be retrieved
objRecCbArg - a callback object token that will be passed in the retrieve method

setSourceNotification

public void setSourceNotification(LBMSourceNotification cb,
                                  java.lang.Object cbarg)
Set the callback and token to be used for source notifications.


clearSourceNotification

public void clearSourceNotification()
Clear the currently stored source notification callback and token


enableSourceNotification

public void enableSourceNotification()
Enable new source notifications. New source notifications are delivered via the source notification callback set by LBMContext.addSourceNotifyCallback(com.latencybusters.lbm.LBMSourceNotification).

See Also:
LBMContext.addSourceNotifyCallback(com.latencybusters.lbm.LBMSourceNotification), disableSourceNotification()

disableSourceNotification

public void disableSourceNotification()
Disable new source notifications.


setContextSourceEventCallback

public void setContextSourceEventCallback(LBMContextSourceEventCallback cb)
Set the context-level source event callback for an LBMContext.

Parameters:
cb - An object implementing the LBMContextSourceEventCallback interface.

setContextSourceEventCallback

public void setContextSourceEventCallback(LBMContextSourceEventCallback cb,
                                          java.lang.Object cbArg)
Set the context-level source event callback for an LBMContext and associated callback object.

Parameters:
cb - An object implementing the LBMContextSourceEventCallback interface.
cbArg - A user-supplied callback object to be passed back in context source event callbacks.

setContextSourceEventCallback

public void setContextSourceEventCallback(LBMContextSourceEventCallback cb,
                                          LBMEventQueue evq)
Set the context-level source event callback for an LBMContext and associated callback object.

Parameters:
cb - An object implementing the LBMContextSourceEventCallback interface.
evq - An LBMEventQueue on which to place context source events.

setContextSourceEventCallback

public void setContextSourceEventCallback(LBMContextSourceEventCallback cb,
                                          java.lang.Object cbArg,
                                          LBMEventQueue evq)
Set the context-level source event callback for an LBMContext and associated callback object.

Parameters:
cb - An object implementing the LBMContextSourceEventCallback interface.
cbArg - A user-supplied callback object to be passed back in context source event callbacks.
evq - An LBMEventQueue on which to place context source events.

setContextEventCallback

public void setContextEventCallback(LBMContextEventCallback cb)
Set the context event callback for an LBMContext.

Parameters:
cb - An object implementing the LBMContextEventCallback interface.

setContextEventCallback

public void setContextEventCallback(LBMContextEventCallback cb,
                                    java.lang.Object cbArg)
Set the context event callback for an LBMContext and associated callback object.

Parameters:
cb - An object implementing the LBMContextEventCallback interface.
cbArg - A user-supplied callback object to be passed back in context event callbacks.

setContextEventCallback

public void setContextEventCallback(LBMContextEventCallback cb,
                                    LBMEventQueue evq)
Set the context event callback for an LBMContext and associated callback object.

Parameters:
cb - An object implementing the LBMContextEventCallback interface.
evq - An LBMEventQueue on which to place context events.

setContextEventCallback

public void setContextEventCallback(LBMContextEventCallback cb,
                                    java.lang.Object cbArg,
                                    LBMEventQueue evq)
Set the context event callback for an LBMContext and associated callback object.

Parameters:
cb - An object implementing the LBMContextEventCallback interface.
cbArg - A user-supplied callback object to be passed back in context event callbacks.
evq - An LBMEventQueue on which to place context events.

setImmediateMessageCallback

public void setImmediateMessageCallback(LBMImmediateMessageCallback cb)
Set (and enable) the context callback for topic-less immediate mode messages.

Parameters:
cb - An object implementing the LBMImmediateMessageCallback interface.

setImmediateMessageCallback

public void setImmediateMessageCallback(LBMImmediateMessageCallback cb,
                                        LBMEventQueue evq)
Set (and enable) the context callback for topic-less immediate mode messages.

Parameters:
cb - An object implementing the LBMImmediateMessageCallback interface.
evq - LBMEventQueue on which to place received topic-less immediate-mode messages (can be null).

setImmediateMessageCallback

public void setImmediateMessageCallback(LBMImmediateMessageCallback cb,
                                        java.lang.Object cbArg)
Set (and enable) the context callback for topic-less immediate mode messages.

Parameters:
cb - An object implementing the LBMImmediateMessageCallback interface.
cbArg - A user-supplied callback object to be passed back in to the immediate message receiver callback.

setImmediateMessageCallback

public void setImmediateMessageCallback(LBMImmediateMessageCallback cb,
                                        java.lang.Object cbArg,
                                        LBMEventQueue evq)
Set (and enable) the context callback for topic-less immediate mode messages.

Parameters:
cb - An object implementing the LBMImmediateMessageCallback interface.
cbArg - A user-supplied callback object to be passed back in to the immediate message receiver callback.
evq - LBMEventQueue on which to place received topic-less immediate-mode messages (can be null).

setSourceCostCallback

public void setSourceCostCallback(LBMSourceCostCallback cb)
Set the source cost callback function for an LBMContext, which is an application callback to evaluate the cost of a newly discovered source

Parameters:
cb - LBMSourceCostCallback callback implementation

setSourceCostCallback

public void setSourceCostCallback(LBMSourceCostCallback cb,
                                  java.lang.Object cbArg)
Set the source cost callback function for an LBMContext, which is an application callback to evaluate the cost of a newly discovered source

Parameters:
cb - LBMSourceCostCallback callback implementation
cbArg - Callback object token

setReceiverLivenessNotificationCallbacks

public void setReceiverLivenessNotificationCallbacks(UMEReceiverLivenessCreationCallback creationCb,
                                                     UMEReceiverLivenessDeletionCallback deletionCb,
                                                     java.lang.Object cbArg)
                                              throws LBMException
Register callbacks for new receiver liveness notifications and receiver deletion notifications.

Throws:
LBMException

getRcvLivenessCreateCB

public UMEReceiverLivenessCreationCallback getRcvLivenessCreateCB()

getRcvLivenessDeleteCB

public UMEReceiverLivenessDeletionCallback getRcvLivenessDeleteCB()

getRcvLivenessClientd

public java.lang.Object getRcvLivenessClientd()


All of the documentation and software included in this and any other Informatica Inc "Ultra Messaging" Release is Copyright (C) 2004-2014, Informatica Corporation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted only as covered by the terms of a valid software license agreement with 29West Inc. Copyright © 2004-2014, Informatica, Inc. All Rights Reserved.