com.latencybusters.lbm
Class LBMReceiverAttributes

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.LBMReceiverAttributes
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.Object,java.lang.Object>

public class LBMReceiverAttributes
extends java.util.Properties

Encapsulates the set of default LBM receiver attributes.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.Properties
defaults
 
Constructor Summary
LBMReceiverAttributes()
          Create and fill an LBMReceiverAttributes object with the current default values.
LBMReceiverAttributes(java.lang.String contextName, java.lang.String topic)
          Create and fill an LBMReceiverAttributes object with the current default values for the given context name and receiver topic name.
 
Method Summary
 void dispose()
          Free memory associated with this set of attributes.
 LBMConfigOption[] dumpAttributeList()
          Returns an array of LBMConfigOptions
protected  void finalize()
           
 java.lang.String getValue(java.lang.String attributeName)
          Returns the current value of an attribute from this set of receiver-related attributes.
 void load(java.io.InputStream inStream)
          Reads a property (attribute) list (key and element pairs) from the input stream.
 void setFromXml(java.lang.String contextName, java.lang.String topic)
          Fill an LBMReceiverAttributes object with the default values specified by the XML configuration for the given context name and receiver topic name.
 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 receiver-related attributes.
 void setRecoverySequenceNumberCallback(UMERecoverySequenceNumberCallback cb, java.lang.Object cbArg)
          Register an extended callback interface (and a callback handle argument) to be called to enable a receiver to set the low sequence number it uses for recovery events (including late joins and durable subscriptions).
 void setRegistrationIdCallback(LBMRegistrationIdCallback cb, java.lang.Object cbArg)
          Register a callback interface (and a callback handle argument) to be called to enable a receiver to set the registration ID it uses for a given source (UME only).
 void setRegistrationIdCallback(UMERegistrationIdExCallback cb, java.lang.Object cbArg)
          Register an extended callback interface (and a callback handle argument) to be called to enable a receiver to set the registration ID it uses for a given source (UME only).
 void setSourceNotificationCallbacks(LBMSourceCreationCallback creationCb, LBMSourceDeletionCallback deletionCb, java.lang.Object cbArg)
          Register callbacks for new source notifications and source deletion notifications for sources on the topic a receiver is listening to.
 void setValue(java.lang.String attributeName, java.lang.String attributeValue)
          Set the current value of an attribute in this set of receiver-related 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

LBMReceiverAttributes

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

Throws:
LBMException

LBMReceiverAttributes

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

Parameters:
contextName - Context name string.
topic - Receiver topic name string.
Throws:
LBMException - if the context name and / or receiver topic name is not permitted by the configuration or other operational failure.
Method Detail

setFromXml

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

Parameters:
contextName - Context name string.
topic - Receiver topic name string.
Throws:
LBMException - if the context name and / or receiver topic name 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 receiver-related 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 receiver-related 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 receiver-related 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

setRegistrationIdCallback

public void setRegistrationIdCallback(LBMRegistrationIdCallback cb,
                                      java.lang.Object cbArg)
Register a callback interface (and a callback handle argument) to be called to enable a receiver to set the registration ID it uses for a given source (UME only). This callback is called directly in line and does not use the event queue; therefore, the callback function used should not block or it will block the context thread processing. This API may not be called from a wildcard receiver create callback. Doing so will not result in the callbacks being called.

Parameters:
cb - An object implementing the LBMRegistrationIdCallback interface
cbArg - Callback object passed as a token to the callback interface
See Also:
LBMRegistrationIdCallback, LBMWildcardReceiverCreateCallback

setRegistrationIdCallback

public void setRegistrationIdCallback(UMERegistrationIdExCallback cb,
                                      java.lang.Object cbArg)
Register an extended callback interface (and a callback handle argument) to be called to enable a receiver to set the registration ID it uses for a given source (UME only). This callback is called directly in line and does not use the event queue; therefore, the callback function used should not block or it will block the context thread processing. This API may not be called from a wildcard receiver create callback. Doing so will not result in the callbacks being called.

Parameters:
cb - An object implementing the LBMRegistrationIdCallback interface
cbArg - Callback object passed as a token to the callback interface
See Also:
LBMRegistrationIdCallback, LBMWildcardReceiverCreateCallback

setRecoverySequenceNumberCallback

public void setRecoverySequenceNumberCallback(UMERecoverySequenceNumberCallback cb,
                                              java.lang.Object cbArg)
Register an extended callback interface (and a callback handle argument) to be called to enable a receiver to set the low sequence number it uses for recovery events (including late joins and durable subscriptions). This callback is called directly in line and does not use the event queue; therefore, the callback function used should not block or it will block the context thread processing. This API may not be called from a wildcard receiver create callback. Doing so will not result in the callbacks being called.

Parameters:
cb - An object implementing the UMERecoverySequenceNumberCallback interface
cbArg - Callback object passed as a token to the callback interface
Since:
UME 2.0
See Also:
UMERecoverySequenceNumberCallback, LBMWildcardReceiverCreateCallback

setSourceNotificationCallbacks

public void setSourceNotificationCallbacks(LBMSourceCreationCallback creationCb,
                                           LBMSourceDeletionCallback deletionCb,
                                           java.lang.Object cbArg)
                                    throws LBMException
Register callbacks for new source notifications and source deletion notifications for sources on the topic a receiver is listening to. Both callbacks must be set. This API may not be called from a wildcard receiver create callback. Doing so will not result in the callbacks being called.

Parameters:
creationCb - Callback for new source notifications.
deletionCb - Callback for source deletions.
cbArg - Client-supplied callback object that will be passed into both the new source and source deletion callbacks.
Throws:
LBMException - if both source creation and source deletion callbacks are not specified at once.
Since:
LBM 3.3, UME 2.0
See Also:
LBMWildcardReceiverCreateCallback


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.