at.ac.tuwien.infosys.rnue.helpers.search
Class SearchResponseImpl

java.lang.Object
  |
  +--at.ac.tuwien.infosys.rnue.helpers.search.SearchResponseImpl
All Implemented Interfaces:
ISearchResponse, java.io.Serializable

public class SearchResponseImpl
extends java.lang.Object
implements ISearchResponse

An object of the SearchResponseImpl class represents the search result form a single ShareMe peer. An object of this type is returned by a remote search on a ShareMe peer. It provides an constructor to create a new SearchResponseImpl object and methods to to query the encapsulated variables.

See Also:
Serialized Form

Constructor Summary
SearchResponseImpl(IFileList fileList, byte[] sig)
          Constructs an instance of the SearchResponseImpl class.
 
Method Summary
 IFileList getFileList()
          Returns the list of files (IFileList) at the remote peer matching the search request.
 byte[] getSignature()
          Returns the signature of this search response.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchResponseImpl

public SearchResponseImpl(IFileList fileList,
                          byte[] sig)
Constructs an instance of the SearchResponseImpl class.

Parameters:
fileList - List of files (IFileList) in the locale file base matching the search request.
sig - Signature of the search query. The signature is generated using the sign method of the ISecurityHelper class. (Takes the value null for task 2.)
Method Detail

getFileList

public IFileList getFileList()
Returns the list of files (IFileList) at the remote peer matching the search request.

Specified by:
getFileList in interface ISearchResponse
Returns:
list of matching files

getSignature

public byte[] getSignature()
Returns the signature of this search response.

Specified by:
getSignature in interface ISearchResponse
Returns:
signature