Oracle Fusion Middleware Java API Reference for Oracle ADF Share
11g Release 2 (11.1.2.1.0)

E17486-02

oracle.adf.share.services
Interface Tokenizable


public interface Tokenizable

Used to control the fast serialize/deserialize of component resource URLDescriptor's. A service developer would implement this interface in all descriptor types for a single service. i.e. all or nothing for a service type. It's also mandatory that each URLDescriptor that implements this interface have a default constructor (preferably very light weight). The framework will call that constructor then immediately call readToken.

NOTE: It is recommended that the string format chosen include an initial field to distinguish the format version used. It is very likely that multiple versions of the writeToken output for your descriptors will need to be handled gracefully by a single version of readToken.


Method Summary
 boolean readToken(java.lang.String writtenToken, DescriptorContext dctx)
          Initialize the descriptor from a previously saved string token.
 void writeToken(java.lang.StringBuilder buf)
          Put the state of this descriptor into a string token.
 

Method Detail

writeToken

void writeToken(java.lang.StringBuilder buf)
Put the state of this descriptor into a string token. It must be readable/digestable across all simultaneously supported releases because the token will be persisted to jar bits.

Parameters:
buf - Buffer that the representation should be appended to. Line ending chars are illegal and should not be used.

readToken

boolean readToken(java.lang.String writtenToken,
                  DescriptorContext dctx)
Initialize the descriptor from a previously saved string token. The framework will call this method after a default construction of the descriptor. NOTE: Default constructor is mandatory!

Parameters:
writtenToken - as the name suggests
dctx - The context in which the descriptor is being recreated

Oracle Fusion Middleware Java API Reference for Oracle ADF Share
11g Release 2 (11.1.2.1.0)

E17486-02

Copyright © 1997, 2011, Oracle. All rights reserved.