Openwings API Documentation (v1.1)

net.openwings.component
Class EventServiceParameters

java.lang.Object
  extended bynet.openwings.component.EventServiceParameters
All Implemented Interfaces:
java.io.Serializable

public class EventServiceParameters
extends java.lang.Object
implements java.io.Serializable

This class defines an object which can be passed to the publishService()/subscribeService() methods of the ComponentComplex interface to interface to specify configuration information and behavior relevant to using asynchronous (event or messaging) services (topics). This includes:

This object can be stored in a EventServicePolicy to make it configurable at deployment time.

See Also:
EventServicePolicy, Serialized Form

Constructor Summary
EventServiceParameters()
          Default constructor
EventServiceParameters(UniqueID componentID, UniqueID serviceID, boolean returnServiceAttributes, boolean returnUserInterfaceFactories, java.lang.Class desiredUIClass, java.lang.Object[] desiredUIConstructorParameters, boolean buildUIImmediately, Attribute[] requiredAttributes)
          General constructor
 
Method Summary
 void addRequiredAttribute(Attribute attribute)
          This convenience method adds a service attribute
 boolean getBuildUIImmediately()
          This method returns a flag that indicates whether the user interface for a used service should built immediately upon locating the service.
 UniqueID getComponentID()
          This method returns the unique identifier for a component.
 java.lang.Class getDesiredUIClass()
          This method returns the desired type of user interface for a service, based on the class of the UI object.
 java.lang.Object[] getDesiredUIConstructorParameters()
          This method returns parameters that a UI factory will pass to the constructor of a UI object.
 Attribute getRequiredAttribute(Attribute attribute)
          This convenience method retrieves a service attribute
 Attribute getRequiredAttribute(java.lang.String attributeName)
          This convenience method retrieves a service attribute by name
 Attribute[] getRequiredAttributes()
          This method returns required attributes for service
 boolean getReturnServiceAttributes()
          This method returns a flag that indicates whether the attributes of a used service should be returned in the serviceAttributes field of a ServiceResult (or ServiceResult).
 boolean getReturnUserInterfaceFactories()
          This method returns a flag that indicates whether the user interface factories attached to a used service should be returned in the userInterfaceFactories field of a ServiceResult.
 UniqueID getServiceID()
          This method returns the unique identifier for a service.
 Attribute removeRequiredAttribute(Attribute attribute)
          This convenience method removes a service attribute return the attribute, or null if the attribute is not in the list
 Attribute removeRequiredAttribute(java.lang.String attributeName)
          This convenience method removes a service attribute by name return the attribute, or null if the attribute is not in the list
 void setBuildUIImmediately(boolean buildUIImmediately)
          This method sets a flag that indicates whether the user interface for a used service should built immediately upon locating the service.
 void setComponentID(UniqueID componentID)
          This method sets the unique identifier for a component.
 void setDesiredUIClass(java.lang.Class desiredUIClass)
          This method sets the desired type of user interface for a service, based on the class of the UI object.
 void setDesiredUIConstructorParameters(java.lang.Object[] desiredUIConstructorParameters)
          This method sets parameters that are to be passed to the constructor of a UI object by a UI factory.
 void setRequiredAttributes(Attribute[] requiredAttributes)
          This method sets required attributes for a service
 void setReturnServiceAttributes(boolean returnServiceAttributes)
          This method sets a flag that indicates whether the attributes of a used service should be returned in the serviceAttributes field of a ServiceResult (or ServiceResult).
 void setReturnUserInterfaceFactories(boolean returnUserInterfaceFactories)
          This method sets a flag that indicates whether the user interface factories attached to a used service should be returned in the userInterfaceFactories field of a ServiceResult.
 void setServiceID(UniqueID serviceID)
          This method sets the unique identifier for a desired service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventServiceParameters

public EventServiceParameters()
Default constructor


EventServiceParameters

public EventServiceParameters(UniqueID componentID,
                              UniqueID serviceID,
                              boolean returnServiceAttributes,
                              boolean returnUserInterfaceFactories,
                              java.lang.Class desiredUIClass,
                              java.lang.Object[] desiredUIConstructorParameters,
                              boolean buildUIImmediately,
                              Attribute[] requiredAttributes)
General constructor

Method Detail

setComponentID

public void setComponentID(UniqueID componentID)
This method sets the unique identifier for a component. This is useful when attempting to use multiple services from the same component.

Parameters:
componentID - unique identifer for a component

getComponentID

public UniqueID getComponentID()
This method returns the unique identifier for a component.

Returns:
unique identifer for a component

setServiceID

public void setServiceID(UniqueID serviceID)
This method sets the unique identifier for a desired service. This limits the search to a single service instance and should be used with care.


getServiceID

public UniqueID getServiceID()
This method returns the unique identifier for a service.

Returns:
unique identifer for a service

setReturnServiceAttributes

public void setReturnServiceAttributes(boolean returnServiceAttributes)
This method sets a flag that indicates whether the attributes of a used service should be returned in the serviceAttributes field of a ServiceResult (or ServiceResult).

Parameters:
returnServiceAttributes - flag

getReturnServiceAttributes

public boolean getReturnServiceAttributes()
This method returns a flag that indicates whether the attributes of a used service should be returned in the serviceAttributes field of a ServiceResult (or ServiceResult).

Returns:
flag

setReturnUserInterfaceFactories

public void setReturnUserInterfaceFactories(boolean returnUserInterfaceFactories)
This method sets a flag that indicates whether the user interface factories attached to a used service should be returned in the userInterfaceFactories field of a ServiceResult.

Parameters:
returnUserInterfaceFactories - flag

getReturnUserInterfaceFactories

public boolean getReturnUserInterfaceFactories()
This method returns a flag that indicates whether the user interface factories attached to a used service should be returned in the userInterfaceFactories field of a ServiceResult.

Returns:
flag

setDesiredUIClass

public void setDesiredUIClass(java.lang.Class desiredUIClass)
This method sets the desired type of user interface for a service, based on the class of the UI object.

Parameters:
desiredUIClass - the UI object returned in ServiceResult will be an instance of this class

getDesiredUIClass

public java.lang.Class getDesiredUIClass()
This method returns the desired type of user interface for a service, based on the class of the UI object.

Returns:
the UI object returned in ServiceResult will be an instance of this class

setDesiredUIConstructorParameters

public void setDesiredUIConstructorParameters(java.lang.Object[] desiredUIConstructorParameters)
This method sets parameters that are to be passed to the constructor of a UI object by a UI factory.

Parameters:
desiredUIConstructorParameters - required parameters for a constructor of the desiredUIClass

getDesiredUIConstructorParameters

public java.lang.Object[] getDesiredUIConstructorParameters()
This method returns parameters that a UI factory will pass to the constructor of a UI object.

Returns:
required parameters for a constructor of desiredUIClass

setBuildUIImmediately

public void setBuildUIImmediately(boolean buildUIImmediately)
This method sets a flag that indicates whether the user interface for a used service should built immediately upon locating the service. This setting only applies if the desiredUIClass attribute is set

Parameters:
buildUIImmediately - flag
See Also:
Container

getBuildUIImmediately

public boolean getBuildUIImmediately()
This method returns a flag that indicates whether the user interface for a used service should built immediately upon locating the service.

Returns:
flag
See Also:
Container

setRequiredAttributes

public void setRequiredAttributes(Attribute[] requiredAttributes)
This method sets required attributes for a service

See Also:
Attribute

getRequiredAttributes

public Attribute[] getRequiredAttributes()
This method returns required attributes for service

Returns:
array of attributes
See Also:
Attribute

addRequiredAttribute

public void addRequiredAttribute(Attribute attribute)
This convenience method adds a service attribute


removeRequiredAttribute

public Attribute removeRequiredAttribute(Attribute attribute)
This convenience method removes a service attribute return the attribute, or null if the attribute is not in the list


removeRequiredAttribute

public Attribute removeRequiredAttribute(java.lang.String attributeName)
This convenience method removes a service attribute by name return the attribute, or null if the attribute is not in the list


getRequiredAttribute

public Attribute getRequiredAttribute(Attribute attribute)
This convenience method retrieves a service attribute


getRequiredAttribute

public Attribute getRequiredAttribute(java.lang.String attributeName)
This convenience method retrieves a service attribute by name


Openwings API Documentation (v1.1)