How to build read-only channel programmatically?

Hi All,

is it possible at all to build a channel dynamically and make it read-only by using ChannelBuilder or something similar?

When I say read-only I mean something similar what you define a channel in xml file e.g.:

<channel-type id="rssi">
        <item-type>Number</item-type>
        <label>RSSI</label>
        <description>Received signal strength indicator</description>
        <state readOnly="true"></state>
    </channel-type>

Thanks