com.levigo.jadice.document.flavor
Class IntraDOCPDataFlavor

java.lang.Object
  extended by java.awt.datatransfer.DataFlavor
      extended by com.levigo.jadice.document.flavor.IntraDOCPDataFlavor
All Implemented Interfaces:
Externalizable, Serializable, Cloneable

public class IntraDOCPDataFlavor
extends DataFlavor

A DataFlavor used for moving or copying Pages across jadice application running in different JVMs.

This flavor keeps track from which JVM it was created so that the receiving side can decide if it will support this flavor or not. Due to some JVM internal issues this must information is coded into the MIME type so that this flavor has no fixed MIME type.

See Also:
Serialized Form

Field Summary
static String INTRA_DOCP_MIME_TYPE_PREFIX
          The prefix of the MIME type.
protected static UUID JVM_ID
           
protected static char SEPARATOR
           
static String VERSION
          The current version of the protocol for intra DOCP transfer.
 
Fields inherited from class java.awt.datatransfer.DataFlavor
imageFlavor, javaFileListFlavor, javaJVMLocalObjectMimeType, javaRemoteObjectMimeType, javaSerializedObjectMimeType, plainTextFlavor, stringFlavor
 
Method Summary
static IntraDOCPDataFlavor get()
           
static String getVersion(DataFlavor flavor)
          Returns the version number of the given flavor.
static boolean isFromSameJVM(DataFlavor flavor)
          Checks if the given flavor is an IntraDOCPDataFlavor from the same JVM.
static boolean isIntraDOCPDataFlavor(DataFlavor flavor)
          Checks if the given flavor is an IntraDOCPDataFlavor.
 
Methods inherited from class java.awt.datatransfer.DataFlavor
clone, equals, equals, equals, getDefaultRepresentationClass, getDefaultRepresentationClassAsString, getHumanPresentableName, getMimeType, getParameter, getPrimaryType, getReaderForText, getRepresentationClass, getSubType, getTextPlainUnicodeFlavor, hashCode, isFlavorJavaFileListType, isFlavorRemoteObjectType, isFlavorSerializedObjectType, isFlavorTextType, isMimeTypeEqual, isMimeTypeEqual, isMimeTypeSerializedObject, isRepresentationClassByteBuffer, isRepresentationClassCharBuffer, isRepresentationClassInputStream, isRepresentationClassReader, isRepresentationClassRemote, isRepresentationClassSerializable, match, normalizeMimeType, normalizeMimeTypeParameter, readExternal, selectBestTextFlavor, setHumanPresentableName, toString, tryToLoadClass, writeExternal
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

INTRA_DOCP_MIME_TYPE_PREFIX

public static final String INTRA_DOCP_MIME_TYPE_PREFIX
The prefix of the MIME type. Additional information about the JVM instance and the version of the transfer protocol are added at runtime

See Also:
Constant Field Values

VERSION

public static final String VERSION
The current version of the protocol for intra DOCP transfer. This value might change in the future so that the internal transfer mechanism can ensure backward compatibility if it exchanges data with a prior version.

See Also:
Constant Field Values

SEPARATOR

protected static final char SEPARATOR
See Also:
Constant Field Values

JVM_ID

protected static final UUID JVM_ID
Method Detail

get

public static IntraDOCPDataFlavor get()
Returns:
the IntraDOCPDataFlavor for the current JVM instance.

isIntraDOCPDataFlavor

public static boolean isIntraDOCPDataFlavor(DataFlavor flavor)
Checks if the given flavor is an IntraDOCPDataFlavor.

Parameters:
flavor - the DataFlavor to check.
Returns:
true iff the given flavor is an IntraDOCPDataFlavor.

isFromSameJVM

public static boolean isFromSameJVM(DataFlavor flavor)
Checks if the given flavor is an IntraDOCPDataFlavor from the same JVM.

Parameters:
flavor - the DataFlavor to check
Returns:
true iff the given flaovr is an IntraDOCPDataFlavor from the same JVM.

getVersion

public static String getVersion(DataFlavor flavor)
Returns the version number of the given flavor. This is used to ensure backward compatibility with prior versions if the internal transfer protocol might change in the future

Parameters:
flavor - the DataFlavor from which to retrieve the version
Returns:
the version number or null if given flavor is no IntraDOCPDataFlavor.
See Also:
VERSION


Copyright © 1995-2020 levigo holding gmbh. All Rights Reserved.