Open vcharpenay opened 2 years ago
Currently, a TD that has forms with unknown bindings cannot be read, because of an exception thrown by TDGraphReader
(l. 335). Yet, as it is currently designed, the lib may already be used by external code (that would provide more bindings than HTTP or CoAP).
Could that behavior be relaxed?
See on-going development in this direction at Hypermedea/wot-td-java.
Currently, it seems that WoT consumers have to know in advance the protocol binding of a Thing. If a Thing has both an HTTP and a CoAP binding, a consumer has to decide statically whether to instantiate a
TDHttpRequest
or aTDCoapRequest
from each form.Would it be possible to instantiate a generic object representing a request (or, in the WoT terminology, an operation)? Here is a suggestion:
Protocol bindings may register themselves to
ProtocolBindingFactory
.