eu.xtreemos.xosd.jobDirectory
Class JobDirectory

java.lang.Object
  extended by eu.xtreemos.system.eventmachine.stage.AbstractStage
      extended by eu.xtreemos.system.eventmachine.stage.AbstractReceivingStage
          extended by eu.xtreemos.system.eventmachine.stage.Abstract2wayStage
              extended by eu.xtreemos.xosd.jobDirectory.JobDirectory
All Implemented Interfaces:
eu.xtreemos.system.eventmachine.queue.IEventHandler, eu.xtreemos.system.eventmachine.stage.IStage
Direct Known Subclasses:
eu.xtreemos.xosd.jobDirectory.service.JobDirectoryHandler

public class JobDirectory
extends eu.xtreemos.system.eventmachine.stage.Abstract2wayStage

Author:
gregor.pipan@xlab.si

Field Summary
protected static java.lang.String ATTRIBUTE_USER
           
protected  eu.xtreemos.xosd.jobDirectory.config.CJobDirectoryConfig config
           
private  java.util.Hashtable<java.lang.String,CommunicationAddress> list
           
private  java.util.Hashtable<java.lang.String,java.util.ArrayList<java.lang.String>> users
           
 
Fields inherited from class eu.xtreemos.system.eventmachine.stage.Abstract2wayStage
context, counter, curContext, sink
 
Fields inherited from class eu.xtreemos.system.eventmachine.stage.AbstractReceivingStage
queue
 
Fields inherited from class eu.xtreemos.system.eventmachine.stage.AbstractStage
handlerChain, handlerGroup, handlerThreads, name, running, serviceListeners
 
Constructor Summary
JobDirectory()
           
 
Method Summary
 void addJob(java.lang.String jobId, CommunicationAddress addrJobMng, java.lang.String userId)
           
 java.lang.String getHandledEventType()
           
 CommunicationAddress getJobAddr(java.lang.String jobId)
           
 java.util.ArrayList<CommunicationAddress> getJobAddrList(java.util.ArrayList<java.lang.String> jobList)
           
 CommunicationAddress getJobAddrSucceeded(CommunicationAddress result)
           
 java.lang.String getJobIDs()
           
 java.util.Hashtable<java.lang.String,CommunicationAddress> getJobsUser(java.lang.String userId)
           
 java.util.Hashtable<java.lang.String,CommunicationAddress> getJobsUserSucceeded(java.util.Hashtable<java.lang.String,CommunicationAddress> result)
           
 void handleEvent(java.lang.Object event)
           
 void init()
           
 void removeJob(java.lang.String jobId, java.lang.String userId)
           
 
Methods inherited from class eu.xtreemos.system.eventmachine.stage.Abstract2wayStage
getContext, removeContext, SendException, SendException, SendException, SendReply, SendReply, SendReply, setSink
 
Methods inherited from class eu.xtreemos.system.eventmachine.stage.AbstractReceivingStage
dequeue, getSource
 
Methods inherited from class eu.xtreemos.system.eventmachine.stage.AbstractStage
addHandler, addHandler, addServiceListener, getName, getShortName, getThreadCount, notifyServiceInitialised, notifyServiceStarted, notifyServiceStopped, processEvent, removeHandler, removeServiceListener, setThreadCount, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ATTRIBUTE_USER

protected static final java.lang.String ATTRIBUTE_USER
See Also:
Constant Field Values

config

protected eu.xtreemos.xosd.jobDirectory.config.CJobDirectoryConfig config

list

private java.util.Hashtable<java.lang.String,CommunicationAddress> list

users

private java.util.Hashtable<java.lang.String,java.util.ArrayList<java.lang.String>> users
Constructor Detail

JobDirectory

public JobDirectory()
Method Detail

init

public void init()
Specified by:
init in interface eu.xtreemos.system.eventmachine.stage.IStage
Overrides:
init in class eu.xtreemos.system.eventmachine.stage.AbstractStage

addJob

public void addJob(java.lang.String jobId,
                   CommunicationAddress addrJobMng,
                   java.lang.String userId)
            throws java.lang.Exception
Throws:
java.lang.Exception

removeJob

public void removeJob(java.lang.String jobId,
                      java.lang.String userId)
               throws java.lang.Exception
Throws:
java.lang.Exception

getJobAddr

public CommunicationAddress getJobAddr(java.lang.String jobId)
                                throws java.lang.Exception
Throws:
java.lang.Exception

getJobAddrList

public java.util.ArrayList<CommunicationAddress> getJobAddrList(java.util.ArrayList<java.lang.String> jobList)
                                                         throws java.lang.Exception
Throws:
java.lang.Exception

getJobAddrSucceeded

public CommunicationAddress getJobAddrSucceeded(CommunicationAddress result)
                                         throws java.lang.Exception
Throws:
java.lang.Exception

getJobsUser

public java.util.Hashtable<java.lang.String,CommunicationAddress> getJobsUser(java.lang.String userId)
                                                                       throws java.lang.Exception
Throws:
java.lang.Exception

getJobsUserSucceeded

public java.util.Hashtable<java.lang.String,CommunicationAddress> getJobsUserSucceeded(java.util.Hashtable<java.lang.String,CommunicationAddress> result)

getJobIDs

public java.lang.String getJobIDs()
                           throws java.lang.Exception
Throws:
java.lang.Exception

handleEvent

public void handleEvent(java.lang.Object event)
                 throws java.lang.Exception
Specified by:
handleEvent in interface eu.xtreemos.system.eventmachine.queue.IEventHandler
Specified by:
handleEvent in class eu.xtreemos.system.eventmachine.stage.AbstractReceivingStage
Throws:
java.lang.Exception

getHandledEventType

public java.lang.String getHandledEventType()
Specified by:
getHandledEventType in class eu.xtreemos.system.eventmachine.stage.AbstractReceivingStage