[snmp] Re: AsnObjectId

Birgit Arkesteijn birgit at westhawk.co.uk
Wed Jul 23 14:20:52 BST 2008


Hi Josh,

I checked AsnObjectId in cvs. My changes:

For deserialization:
- Changed class variable 'value' so it's empty.
- Made default constructor protected.
- Set type=ASN_OBJECT_ID in default constructor.
- Called this() in other constructors, except
   AsnObjectId(InputStream in, int len)

Cheers, Birgit

On 27/05/08 16:09, Birgit Arkesteijn wrote:
> Hi Josh,
> 
> Sorry for my late reply, but I've been on holiday.
> 
> I don't see how you can do it without any changes to the class.
> I suggest:
> - I make the default constructor "protected" instead of "class protected",
> - I changed it so value is an empty array.
> 
> What do you think?
> 
> Cheers, Birgit
> 
> 
> On 22/05/08 16:03, Josh Bers wrote:
>> I am trying to serialize the AsnObjectId class via a wrapper 
>> (subclass). The problem is that there is no way to modify the array of 
>> longs (OID) once instantiated. I could use the add() methods, however, 
>> the default empty constructor is not protected (it is package access) 
>> and the default value for the OID is some test value, e.g., 
>> {1,3,6,1,4,1,674,10889,2,1,0} instead of {} making it impossible to do 
>> serialization in the subclass.
>>
>>  
>>
>> Any suggestions on how to serialize without modifying the Westhawk 
>> code are appreciated.
>>
>>  
>>
>> Thanks,
>>
>>  
>>
>> Josh
>>
>>  
>>
>> Josh Bers
>>
>> Senior Engineer, Mobile Networking Systems
>>
>> BBN Technologies
>>
>> web: www.bbn.com <http://www.bbn.com> ph: (617) 873-4262 fax: (617) 
>> 873-4523
>>
>>  
>>
> 

-- 
-- Birgit Arkesteijn, birgit at westhawk.co.uk,
-- Westhawk Ltd, Albion Wharf, 19 Albion Street, Manchester M1 5LN, UK
-- Company no: 1769350
-- Registered Office:
-- 15 London Road, Stockton Heath, Warrington WA4 6SJ. UK.
-- tel.: +44 (0)161 237 0660
-- <URL: http://www.westhawk.co.uk>


More information about the snmp mailing list