Interface SFSBUUIDUtil<T>

  • All Known Implementing Classes:
    ScrambledKeyGenerator, SimpleKeyGenerator

    public interface SFSBUUIDUtil<T>
    An instance of this class will be used by the Stateful SessionBean Container to create sessionIDs whenever home.create(..) is called
    Author:
    Mahesh Kannan
    • Method Detail

      • createSessionKey

        T createSessionKey()
        Create and return the sessionKey.
        Returns:
        the sessionKey object
      • keyToByteArray

        byte[] keyToByteArray​(T sessionKey)
        Called from the Container before publishing an IOR. The method must convert the sessionKey into a byte[]
        Returns:
        A byte[] representation of the key. The byte[] could be created using serialization.
      • byteArrayToKey

        T byteArrayToKey​(byte[] array,
                         int startIndex,
                         int len)
        Return the sessionKey that represents the sessionKey. This has to be super efficient as the container calls this method on every invocation. Two objects obtained from identical byte[] must satisfy both o1.equals(o2) and o1.hashCode() == o2.hashCode()
        Returns:
        the sessionKey object