Class ExtractorAdapter<E,​M>


  • public class ExtractorAdapter<E,​M>
    extends ShardingMessageExtractor<java.lang.Object,​M>
    INTERNAL API Extracts entityId and unwraps ShardingEnvelope and StartEntity messages. Other messages are delegated to the given ShardingMessageExtractor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String entityId​(java.lang.Object message)
      Extract the entity id from an incoming message.
      java.lang.String shardId​(java.lang.String entityId)
      The shard identifier for a given entity id.
      java.lang.String toString()  
      M unwrapMessage​(java.lang.Object message)
      Extract the message to send to the entity from an incoming message.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Method Detail

      • entityId

        public java.lang.String entityId​(java.lang.Object message)
        Description copied from class: ShardingMessageExtractor
        Extract the entity id from an incoming message. If null is returned the message will be unhandled, i.e. posted as Unhandled messages on the event stream
        Specified by:
        entityId in class ShardingMessageExtractor<java.lang.Object,​M>
        Parameters:
        message - (undocumented)
        Returns:
        (undocumented)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • unwrapMessage

        public M unwrapMessage​(java.lang.Object message)
        Description copied from class: ShardingMessageExtractor
        Extract the message to send to the entity from an incoming message. Note that the extracted message does not have to be the same as the incoming message to support wrapping in message envelope that is unwrapped before sending to the entity actor.
        Specified by:
        unwrapMessage in class ShardingMessageExtractor<java.lang.Object,​M>
        Parameters:
        message - (undocumented)
        Returns:
        (undocumented)