Hi,
If you are using registry resource to keep this mapping, you can have a
resource object for each workerNode and as a property you can store this
Bridge ArrayList. But you have to convert the values as List<String> to
store as a registry resource property. Then again for the IP mappings of
the Bridge you can have another property ( say userIPList) and store the
user IPs as a List<String> as the property value.

On Tue, Mar 20, 2012 at 9:44 AM, Subash Chaturanga <[email protected]> wrote:

> Hi Lahiru,
>
> On Tue, Mar 20, 2012 at 9:02 AM, Lahiru Sandaruwan <[email protected]>wrote:
>
>> Hi ,
>>
>> I'm adding some resources to registry at [1] path as in attached
>> diagram. There I need to add a property to Worker node which is a
>> Array list (ArrayList<Bridge>).  Bridge is also having Array lists of
>> IPs[2].
>>
>> I can do this by adding Bridge  as a resource to Worker node and again
>> adding IPs to Bridge as properties. Can anyone please advice me if
>> there is a better way to proceed?
>>
>>
> For the registry, what you can put is only resources. Is your Bridge class
> serializable ? If so you can do it in your way, which I also seems as a
> better way.
> ( i.e you can save an instance inside resource's content). If the IPs are
> again objects, you can maintain child IP resources inside Bridge resources.
> Unless you can easily use resource.setProperty(String) or
> resource.setPropertyValues(​List<String>)
>
> Hope I answered your question.
>
>
>> Thanks.
>>
>> [1] /_system/config/repository/​hosting/zones
>>
>>
>> [2] private ArrayList<String> usedIpList;
>>
>>    private ArrayList<String> availableIpList;
>>
>>
>>
>> --
>> --
>>
>> Lahiru Sandaruwan
>> Software Engineer,
>> Cloud Team,
>> WSO2 Inc., http://wso2.com
>> lean.enterprise.middleware
>>
>> email: [email protected] cell: (+94) 773 325 954
>> blog: http://lahiruwrites.blogspot.​com/<http://lahiruwrites.blogspot.com/>
>> twitter: http://twitter.com/lahirus
>> linked-in <http://twitter.com/lahiruslinked-in>:
>> http://lk.linkedin.com/pub/​lahiru-sandaruwan/16/153/146<http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146>
>>
>> ______________________________​_________________
>> Dev mailing list
>> [email protected]
>> http://wso2.org/cgi-bin/​mailman/listinfo/dev<http://wso2.org/cgi-bin/mailman/listinfo/dev>
>>
>>
>
>
> --
>
> Subash Chaturanga
> Software Engineer
> WSO2 Inc. http://wso2.com
>
> email - [email protected]
> phone - 077 2225922
>
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Ashansa Perera
Software Engineer
WSO2, Inc
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to