|
Openwings API Documentation (v1.1) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.openwings.component.ServiceResult
This class is used to associate a used service object with its unique service identifier and additional information such as service attributes and user interfaces.
For synchronous services, this class is returned
from calls to Component.useService() and is passed to
UseServiceListener.serviceProvided().
Additional information can be requested by passing a
UseServiceParameters object in the
useService() call.
For asynchronous services, this class is returned
from calls to Component.publishService() /
Component.subscribeService() and is passed to
EventServiceListener.serviceAvailable().
For service subscribers, the service object will be null.
Additional information can be requested by passing a
EventServiceParameters object in the
Component.publishService() /
Component.subscribeService() call.
| Constructor Summary | |
ServiceResult()
Default constructor. |
|
ServiceResult(UniqueID serviceID,
UniqueID componentID,
java.lang.Object service,
Attribute[] serviceAttributes,
java.lang.Object userInterface,
UserInterfaceFactory[] factories)
Simple constructor. |
|
| Method Summary | |
UniqueID |
getComponentID()
This method returns the global unique service identifier for the component that provided this synchronous service / created this asynchronous service (topic), if known. |
java.lang.Object |
getService()
This method returns the service object. |
Attribute |
getServiceAttribute(java.lang.String attributeName)
This convenience method retrieves a service attribute by name. |
Attribute[] |
getServiceAttributes()
This method returns attributes that describe a service, if requested |
UniqueID |
getServiceID()
This method returns the global unique service identifier for this service |
java.lang.Object |
getUserInterface()
This method returns the user interface object for this service, if one was requested. |
UserInterfaceFactory[] |
getUserInterfaceFactories()
This method returns acceptable user interface factories for this service, if requested. |
void |
setComponentID(UniqueID componentID)
This method sets the global unique service identifier for the component that provided this synchronous service / created this asynchronous service (topic), if known. |
void |
setService(java.lang.Object service)
This method sets the service object. |
void |
setServiceAttributes(Attribute[] attributes)
This method sets the attributes that describe the service |
void |
setServiceID(UniqueID serviceID)
This method sets the global unique service identifier for this service |
void |
setUserInterface(java.lang.Object userInterface)
This method sets the user interface object for this service. |
void |
setUserInterfaceFactories(UserInterfaceFactory[] factories)
This method sets acceptable user interface factories for this service. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ServiceResult()
public ServiceResult(UniqueID serviceID,
UniqueID componentID,
java.lang.Object service,
Attribute[] serviceAttributes,
java.lang.Object userInterface,
UserInterfaceFactory[] factories)
serviceID - global unique service identifierservice - service objectuserInterface - optional user interface attached to the service| Method Detail |
public UniqueID getServiceID()
public void setServiceID(UniqueID serviceID)
public UniqueID getComponentID()
public void setComponentID(UniqueID componentID)
public java.lang.Object getService()
ServiceResult is for a service subscriber, the
method returns null.
public void setService(java.lang.Object service)
ServiceResult is for a service subscriber, the
value should be null.
public Attribute[] getServiceAttributes()
To request that attributes be returned for a synchronous service, a
UseServiceParameters must be passed to one of the
ComponentComplex.useService() methods, with the following
settings:
returnServiceAttributes attribute must be
true.
To request that attributes be returned for an asynchronous service
(topic), a EventServiceParameters must be passed to one of
the ComponentComplex.publishService() /
ComponentComplex.subscribeService() methods, with the
following settings:
returnServiceAttributes attribute must be
true.
public void setServiceAttributes(Attribute[] attributes)
attributes - array of attributespublic Attribute getServiceAttribute(java.lang.String attributeName)
attributeName - name of the attribute to retrieve
null if no attribute
with the name was found.public java.lang.Object getUserInterface()
To request a user interface for a synchronous service, a
UseServiceParameters must be passed to one of the
ComponentComplex.useService() methods, with the following
settings:
buildUIImmediately attribute must be
true.
To request a user interface for an asynchronous service, a
EventServiceParameters must be passed to one of the
ComponentComplex.publishService() /
ComponentComplex.subscribeService() methods,
with the following settings:
buildUIImmediately attribute must be
true.
public void setUserInterface(java.lang.Object userInterface)
userInterface - user interface object.public UserInterfaceFactory[] getUserInterfaceFactories()
To request that user interface factories be returned for a synchronous
service, a UseServiceParameters must be passed to one of the
ComponentComplex.useService() methods, with the following
settings:
returnUserInterfaceFactories attribute must be
true.
desiredUIClass and/or
desiredUIConstructorParameters attributes are set, only
UserInterfaceFactory objects that meet the criteria
will be returned.
To request that user interface factories be returned for an
asynchronous service, an EventServiceParameters must be
passed to one of the ComponentComplex.publishService() /
ComponentComplex.subscribeService() methods, with the
following settings:
returnUserInterfaceFactories attribute must be
true.
desiredUIClass and/or
desiredUIConstructorParameters attributes are set, only
UserInterfaceFactory objects that meet the criteria
will be returned.
public void setUserInterfaceFactories(UserInterfaceFactory[] factories)
factories - user interface factories.
|
Openwings API Documentation (v1.1) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||