Package edu.jas.util

Class DHTTransportMarshal<K,​V>

  • All Implemented Interfaces:
    java.io.Serializable

    class DHTTransportMarshal<K,​V>
    extends DHTTransport<K,​V>
    Transport container for a distributed version of a HashTable. Immutable objects. Uses MarshalledObject to avoid deserialization on server side.
    • Constructor Summary

      Constructors 
      Constructor Description
      DHTTransportMarshal​(K key, V value)
      Constructs a new DHTTransport Container.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      K key()
      Get the key from this DHTTransport Container.
      private void readObject​(java.io.ObjectInputStream in)  
      java.lang.String toString()
      toString.
      V value()
      Get the value from this DHTTransport Container.
      private void writeObject​(java.io.ObjectOutputStream out)  
      • Methods inherited from class java.lang.Object

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

      • key

        protected final java.rmi.MarshalledObject key
      • value

        protected final java.rmi.MarshalledObject value
    • Constructor Detail

      • DHTTransportMarshal

        public DHTTransportMarshal​(K key,
                                   V value)
                            throws java.io.IOException
        Constructs a new DHTTransport Container.
        Parameters:
        key -
        value -
        Throws:
        java.io.IOException
    • Method Detail

      • key

        public K key()
              throws java.io.IOException,
                     java.lang.ClassNotFoundException
        Get the key from this DHTTransport Container.
        Specified by:
        key in class DHTTransport<K,​V>
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
      • value

        public V value()
                throws java.io.IOException,
                       java.lang.ClassNotFoundException
        Get the value from this DHTTransport Container.
        Specified by:
        value in class DHTTransport<K,​V>
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
      • writeObject

        private void writeObject​(java.io.ObjectOutputStream out)
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • readObject

        private void readObject​(java.io.ObjectInputStream in)
                         throws java.io.IOException,
                                java.lang.ClassNotFoundException
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException