edu.uwf.kaos.coabsgrid
Class KAoSDirectory

java.lang.Object
  extended by Directory
      extended by edu.uwf.kaos.coabsgrid.KAoSDirectory

public class KAoSDirectory
extends Directory

Wraps returned AgentReps in KAosWrappedAgentReps. $Revision: 1.1.1.1 $


Constructor Summary
KAoSDirectory()
           
KAoSDirectory(KAoSGridHelper kgh)
           
 
Method Summary
 ServiceItem[] forwardMsgToGroup(ServiceTemplate tmpl, Message msg)
          Forwards a message to a group of recepients that match the template parameter.
 ServiceItem[] forwardMsgToGroup(ServiceTemplate tmpl, ServiceItemFilter filter, Message msg)
          Forwards a message to a group of recepients that match the template parameter.
 ServiceItem[] lookup(LookupInterface lu, ServiceTemplate tmpl)
          Method that allows a Grid developer to substitute his own lookup algorithm.
 ServiceItem[] lookup(ServiceTemplate tmpl)
          Pass through to Jini ServiceDiscoveryManager.lookup().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KAoSDirectory

public KAoSDirectory()
              throws java.io.IOException
Throws:
java.io.IOException

KAoSDirectory

public KAoSDirectory(KAoSGridHelper kgh)
              throws java.io.IOException
Throws:
java.io.IOException
Method Detail

lookup

public ServiceItem[] lookup(ServiceTemplate tmpl)
                     throws java.rmi.RemoteException
Pass through to Jini ServiceDiscoveryManager.lookup().

Parameters:
tmpl - The ServiceTemplate to match. Pass in null to get all services.
Throws:
java.rmi.RemoteException - If there is a problem doing the lookup with the Jini LUS.
java.lang.IllegalStateException - if the object has been terminated

lookup

public ServiceItem[] lookup(LookupInterface lu,
                            ServiceTemplate tmpl)
                     throws java.rmi.RemoteException
Method that allows a Grid developer to substitute his own lookup algorithm. This was suggested by Sanjeev Kumar of OGI at the Atlanta CoABS Workshop.

Parameters:
lu - The lookup algorithm provided by the grid developer.
tmpl - The template to match.
Throws:
java.rmi.RemoteException - If there is a problem doing the lookup with the Jini LUS.
java.lang.IllegalStateException - if the object has been terminated

forwardMsgToGroup

public ServiceItem[] forwardMsgToGroup(ServiceTemplate tmpl,
                                       ServiceItemFilter filter,
                                       Message msg)
                                throws java.rmi.RemoteException
Forwards a message to a group of recepients that match the template parameter.

Parameters:
tmpl - A Jini ServiceTemplate which lets you match on attributes, service type, or ServiceID. Null matches everything.
filter - The ServiceItemFilter to apply to filter the results returned. Null means do no filtering.
msg - The message to be delivered.
Returns:
An array of the service items that the message was sent to.
Throws:
java.rmi.RemoteException - If there is a problem looking up matching AgentReps
java.lang.IllegalStateException - if the object has been terminated

forwardMsgToGroup

public ServiceItem[] forwardMsgToGroup(ServiceTemplate tmpl,
                                       Message msg)
                                throws java.rmi.RemoteException
Forwards a message to a group of recepients that match the template parameter.

Parameters:
tmpl - A Jini ServiceTemplate which lets you match on attributes, service type, or ServiceID. Null matches everything.
msg - The message to be delivered.
Returns:
An array of the service items that the message was sent to.
Throws:
java.rmi.RemoteException - If there is a problem looking up matching AgentReps.
java.lang.IllegalStateException - if the object has been terminated