eu.xtreemos.xosd.resmng.data
Class ResourceMatching

java.lang.Object
  extended by eu.xtreemos.xosd.resmng.data.ResourceMatching
All Implemented Interfaces:
java.io.Serializable

public class ResourceMatching
extends java.lang.Object
implements java.io.Serializable

Author:
gregor.pipan@xlab.si Creation date: 14.2.2007
See Also:
Serialized Form

Field Summary
private  byte[] digitalSignature
           
private  JobDescription jobdesc
           
private  java.util.Hashtable<java.lang.String,java.lang.Object> jsdlData
          Holds jsdl to check against policy.
private  java.util.HashMap<CommunicationAddress,java.security.cert.X509Certificate> listOfResourceCerts
          This is list of certificates, so that we can extract info from them.
private  java.util.ArrayList<CommunicationAddress> suitable_resources
           
 
Constructor Summary
ResourceMatching()
           
 
Method Summary
 JobDescription getJobDesc()
           
 java.util.Hashtable<java.lang.String,java.lang.Object> getJsdlData()
           
 java.util.HashMap<CommunicationAddress,java.security.cert.X509Certificate> getListOfResourceCerts()
           
 byte[] getSignature()
          Gets signature of the message.
 java.util.ArrayList<CommunicationAddress> getSuitableResources()
           
 java.util.Iterator<CommunicationAddress> iterator()
           
 java.util.ArrayList<CommunicationAddress> list()
           
 void setDesc(JobDescription jobDesc)
           
 void setJsdlData(java.util.Hashtable<java.lang.String,java.lang.Object> jsdlData)
           
 void setListOfResourceCerts(java.util.HashMap<CommunicationAddress,java.security.cert.X509Certificate> listOfResourceCerts)
           
 void setSignature(byte[] signature)
          Sets digital signature of the message.
 void setSuitableResources(java.util.ArrayList<CommunicationAddress> suitable_resources)
           
 void signData(java.security.PrivateKey key)
          Signs suitableResources with digital signature from sender.
 void testResource(CommunicationAddress e)
           
 boolean verifySig(java.security.PublicKey key)
          Verifies data (constructed from arraylist of suitable resources) with the key provided if matches with digitalSignature.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

jobdesc

private JobDescription jobdesc

jsdlData

private java.util.Hashtable<java.lang.String,java.lang.Object> jsdlData
Holds jsdl to check against policy.


suitable_resources

private java.util.ArrayList<CommunicationAddress> suitable_resources

listOfResourceCerts

private java.util.HashMap<CommunicationAddress,java.security.cert.X509Certificate> listOfResourceCerts
This is list of certificates, so that we can extract info from them.


digitalSignature

private byte[] digitalSignature
Constructor Detail

ResourceMatching

public ResourceMatching()
Method Detail

setDesc

public void setDesc(JobDescription jobDesc)

testResource

public void testResource(CommunicationAddress e)

getJobDesc

public JobDescription getJobDesc()

iterator

public java.util.Iterator<CommunicationAddress> iterator()

list

public java.util.ArrayList<CommunicationAddress> list()

signData

public void signData(java.security.PrivateKey key)
              throws java.lang.Exception
Signs suitableResources with digital signature from sender.

Parameters:
key - to be signed with
Throws:
java.lang.Exception

verifySig

public boolean verifySig(java.security.PublicKey key)
                  throws java.lang.Exception
Verifies data (constructed from arraylist of suitable resources) with the key provided if matches with digitalSignature. If those do not match it means resources were forged.

Parameters:
key -
Returns:
Throws:
java.lang.Exception

getSuitableResources

public java.util.ArrayList<CommunicationAddress> getSuitableResources()

setSuitableResources

public void setSuitableResources(java.util.ArrayList<CommunicationAddress> suitable_resources)

getSignature

public byte[] getSignature()
Gets signature of the message.

Returns:

setSignature

public void setSignature(byte[] signature)
Sets digital signature of the message.

Parameters:
signature -

getListOfResourceCerts

public java.util.HashMap<CommunicationAddress,java.security.cert.X509Certificate> getListOfResourceCerts()

setListOfResourceCerts

public void setListOfResourceCerts(java.util.HashMap<CommunicationAddress,java.security.cert.X509Certificate> listOfResourceCerts)

getJsdlData

public java.util.Hashtable<java.lang.String,java.lang.Object> getJsdlData()

setJsdlData

public void setJsdlData(java.util.Hashtable<java.lang.String,java.lang.Object> jsdlData)