void |
advertiseMethod(String methodSignature,
QiService service,
String description)
Bind method from a qimessaging.service to GenericObject.
The given signature MUST be a libqi type signature AND use
Java compatible types :
libqi
Java
b
Boolean
c
Character
v
void
i
Integer
l
Long
f
Float
d
Double
s
String
o
Object
m
Object (dynamic)
[<type>]
ArrayList
{<key><type>}
Map
(<type>....)
Tuple
WARNING :
If method not found, nothing happen.
Be sure the method is unique in name, if two methods with same name
and different signature, you can't be sure it choose the good one
If method choose (by name) have not the correct Java signature, it
will crash later (when call)
<INTERFACE,INSTANCE extends INTERFACE> INTERFACE |
advertiseMethods(Class<INTERFACE> interfaceClass,
INSTANCE instance)
Deprecated.
|
<INTERFACE,INSTANCE extends INTERFACE> INTERFACE |
advertiseMethods(QiSerializer serializer,
Class<INTERFACE> interfaceClass,
INSTANCE instance)
Advertise methods from interface.
All methods of given interface are automatically registered.
To specify a description on method add
AdvertisedMethodDescription annotation on the method.
|
void |
advertiseProperty(String name,
Class<?> propertyBase)
|
<T> void |
advertiseProperty(String name,
Property<T> property)
Advertise a property
Must be called before object()
|
void |
advertiseSignal(String signalSignature)
Advertise a signal with its callback signature.
The given signature MUST be a libqi type signature
|
protected void |
finalize()
Called by garbage collector Finalize is overridden to manually delete C++
data
|
AnyObject |
object()
Instantiate new AnyObject after builder template.
|
void |
setThreadingModel(DynamicObjectBuilder.ObjectThreadingModel threadModel)
Declare the thread-safeness state of an instance
|
-
-
Method Detail
-
advertiseMethods
public <INTERFACE,INSTANCE extends INTERFACE> INTERFACE advertiseMethods(QiSerializer serializer,
Class<INTERFACE> interfaceClass,
INSTANCE instance)
Advertise methods from interface.
All methods of given interface are automatically registered.
To specify a description on method add
AdvertisedMethodDescription annotation on the method.
- Type Parameters:
INTERFACE - Interface type that specifies the list of methods to expose.
INSTANCE - Instance type of interface.
- Parameters:
serializer - Serializer to use
interfaceClass - Interface that specifies the list of methods to expose.
instance - Instance of interface implementation.
- Returns:
- Instance The instance passed as parameter.
Copyright © 2020. All rights reserved.
|