jason.core
Class PathDoor

java.lang.Object
  |
  +--jason.core.PathDoor
All Implemented Interfaces:
Door, JasManagerListener

public class PathDoor
extends java.lang.Object
implements Door, JasManagerListener

Created Thu May 9 09:58:17 2002

This is the default door for a domain. This is a way to integrate easily services from a directory. So, user needn't to declare its services in the jason.xml file and it works like a set of plugIns.

Since:
0.6
See Also:
Door

Field Summary
static java.lang.String JAS_EXT_FILE
           
 
Constructor Summary
PathDoor()
           
 
Method Summary
 Service[] getServices()
           
 void init(DoorContext context)
          This is called at the beginning of the Door using by the Domain container.
 boolean isUpdatable()
          This door can be dynamically called for updating or loading services
 void notifyFile(java.io.File f)
           
 void update()
          Run again the door for signaling new service
 boolean writeService(java.lang.String name, byte[] service)
          Store the service for the name
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JAS_EXT_FILE

public static final java.lang.String JAS_EXT_FILE
See Also:
Constant Field Values
Constructor Detail

PathDoor

public PathDoor()
Method Detail

init

public void init(DoorContext context)
          throws DoorException
This is called at the beginning of the Door using by the Domain container. The location is normally a value from the `jason.xml' file. This is a location for service in any format.

Specified by:
init in interface Door
Parameters:
context - location for services
Throws:
DoorException - exception for bad location value

update

public void update()
Description copied from interface: Door
Run again the door for signaling new service

Specified by:
update in interface Door

notifyFile

public void notifyFile(java.io.File f)
Specified by:
notifyFile in interface JasManagerListener

getServices

public Service[] getServices()
Specified by:
getServices in interface Door
Returns:
All available services

isUpdatable

public boolean isUpdatable()
This door can be dynamically called for updating or loading services

Specified by:
isUpdatable in interface Door
Returns:
true if this door can be called at runtime for updating a service

writeService

public boolean writeService(java.lang.String name,
                            byte[] service)
Store the service for the name

Specified by:
writeService in interface Door
Returns:
false if the service can't be written