Class GetRightsReply

    • Field Detail

      • serialVersionUID

        private static final long serialVersionUID
        define serialVersionUID for interoperability
        See Also:
        Constant Field Values
      • isFreeReading

        private boolean isFreeReading
        True if all users can read this destination.
      • isFreeWriting

        private boolean isFreeWriting
        True if all users can write this destination.
      • readers

        private Hashtable readers
        Table holding the readers identifications.
      • writers

        private Hashtable writers
        Table holding the writers identifications.
    • Constructor Detail

      • GetRightsReply

        public GetRightsReply​(boolean success,
                              String info,
                              boolean isFreeReading,
                              boolean isFreeWriting)
        Constructs a Monitor_GetUsersRep instance.
        Parameters:
        success - True if successful.
        info - Information message.
        isFreeReading - True if all users can read this destination.
        isFreeWriting - True if all users write read this destination.
      • GetRightsReply

        public GetRightsReply()
    • Method Detail

      • isFreeReading

        public boolean isFreeReading()
        Returns true if all users can read this destination.
        Returns:
        True if all users can read this destination.
      • isFreeWriting

        public boolean isFreeWriting()
        Returns true if all users write read this destination.
        Returns:
        True if all users write read this destination.
      • addReader

        public void addReader​(String name,
                              String proxyId)
        Adds a reader to the table.
        Parameters:
        name - the name of user to add.
        proxyId - the proxy identifier.
      • getReaders

        public Hashtable getReaders()
        Returns the readers table.
        Returns:
        An hashtable containing all authorized readers.
      • addWriter

        public void addWriter​(String name,
                              String proxyId)
        Adds a writer to the table.
        Parameters:
        name - the name of user to add.
        proxyId - the proxy identifier.
      • getWriters

        public Hashtable getWriters()
        Returns the writers table.
        Returns:
        An hashtable containing all authorized writers.
      • readFrom

        public void readFrom​(InputStream is)
                      throws IOException
        Description copied from interface: Streamable
        The object implements the readFrom method to restore its contents from the input stream.
        Specified by:
        readFrom in interface Streamable
        Overrides:
        readFrom in class AdminReply
        Parameters:
        is - the stream to read data from in order to restore the object
        Throws:
        IOException - an error occurs during IO operation.
      • writeTo

        public void writeTo​(OutputStream os)
                     throws IOException
        Description copied from interface: Streamable
        The object implements the writeTo method to write its contents to the output stream.
        Specified by:
        writeTo in interface Streamable
        Overrides:
        writeTo in class AdminReply
        Parameters:
        os - the stream to write the object to
        Throws:
        IOException - an error occurs during IO operation.