Search this API

y.view
Interface GenericEdgeRealizer.UserDataHandler

All Known Implementing Classes:
SimpleUserDataHandler
Enclosing class:
GenericEdgeRealizer

public static interface GenericEdgeRealizer.UserDataHandler

This interface is used by GenericEdgeRealizer to delegate the copying and serialization/deserialization of any user-defined data to. Registered implementations of this interface will be used to perform the actual serialization and deserialization of the user-defined data object. Additionally, implementations are responsible for creating appropriate copies of the user-defined data.

 

Method Summary
 java.lang.Object copyUserData(EdgeRealizer srcContext, java.lang.Object srcData, EdgeRealizer targetContext)
          Copies the user-defined data appropriately.
 java.lang.Object readUserData(EdgeRealizer context, java.io.ObjectInputStream ois)
          Retrieves the user-defined data object from the ObjectInputStream.
 void storeUserData(EdgeRealizer context, java.lang.Object userData, java.io.ObjectOutputStream oos)
          Stores the user-defined data object to the ObjectOutputStream.
 

Method Detail

storeUserData

void storeUserData(EdgeRealizer context,
                   java.lang.Object userData,
                   java.io.ObjectOutputStream oos)
                   throws java.io.IOException
Stores the user-defined data object to the ObjectOutputStream. Used for YGF serialization.

Parameters:
context - the edge to store the user-defined data
userData - the user-defined data object
oos - the stream to store the user-defined data object to
Throws:
java.io.IOException - if an exception occurs

readUserData

java.lang.Object readUserData(EdgeRealizer context,
                              java.io.ObjectInputStream ois)
                              throws java.io.IOException
Retrieves the user-defined data object from the ObjectInputStream. Used for YGF deserialization.

Parameters:
context - the edge to read the user-defined data for
ois - the stream to read the user-defined data object from
Returns:
the user-defined data object as read in from the stream
Throws:
java.io.IOException - if an exception occurs

copyUserData

java.lang.Object copyUserData(EdgeRealizer srcContext,
                              java.lang.Object srcData,
                              EdgeRealizer targetContext)
Copies the user-defined data appropriately.

Parameters:
srcContext - the edge that will be copied
srcData - the data associated with the srcContext
targetContext - the edge the copy will be associated with
Returns:
the copy that will be stored with the targetContext

© Copyright 2000-2022,
yWorks GmbH.
All rights reserved.