jade.core
Class ProfileImpl

java.lang.Object
  |
  +--jade.core.Profile
        |
        +--jade.core.ProfileImpl

public class ProfileImpl
extends Profile

This class allows the JADE core to retrieve configuration-dependent classes and boot parameters.

Take care of using different instances of this class when launching different containers/main-containers on the same JVM otherwise they would conflict!

Version:
1.0, 22/11/00
Author:
Federico Bergenti, Giovanni Caire - TILAB, Giovanni Rimassa - Universita` di Parma

Field Summary
static int DEFAULT_PORT
          Default communication port number.
static java.lang.String MOBILITYMGRCLASSNAME
          This constant is the key of the property whose value is the class name of the mobility manager.
 
Fields inherited from class jade.core.Profile
ACLCODECS, AGENTS, AUTHORITY_CLASS, CONTAINER_NAME, FILE_DIR, IMTP, J2SE, JVM, MAIN, MAIN_HOST, MAIN_PORT, MAIN_PROTO, MAINAUTH_CLASS, MIDP, MTPS, OWNER, PASSWD_FILE, PJAVA, PLATFORM_ID, POLICY_FILE, PWD_DIALOG_CLASS, PWD_HASH_ALGORITHM
 
Constructor Summary
ProfileImpl()
          Creates a Profile implementation with the default configuration for launching a main-container on the localhost, RMI internal Message Transport Protocol, port number 1099, iiop MTP.
ProfileImpl(BasicProperties aProp)
           
ProfileImpl(java.lang.String host, int port, java.lang.String platformID)
          This constructor creates a default Profile for launching a platform.
 
Method Summary
protected  jade.core.acc getAcc()
           
protected  IMTPManager getIMTPManager()
           
protected  jade.core.MobilityManager getMobilityManager()
           
protected  jade.core.NotificationManager getNotificationManager()
           
 java.lang.String getParameter(java.lang.String key, java.lang.String aDefault)
          Retrieve a String value from the configuration properties.
protected  jade.core.Platform getPlatform()
           
 BasicProperties getProperties()
          Return the underlying properties collection.
 jade.security.PwdDialog getPwdDialog()
           
protected  jade.core.ResourceManager getResourceManager()
           
 List getSpecifiers(java.lang.String key)
          Retrieve a list of Specifiers from the configuration properties.
 void setParameter(java.lang.String key, java.lang.String value)
          Assign the given value to the given property name.
 void setSpecifiers(java.lang.String key, List value)
          Assign the given property value to the given property name
 java.lang.String toString()
           
 void updatePlatformID()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_PORT

public static final int DEFAULT_PORT
Default communication port number.

MOBILITYMGRCLASSNAME

public static final java.lang.String MOBILITYMGRCLASSNAME
This constant is the key of the property whose value is the class name of the mobility manager.
Constructor Detail

ProfileImpl

public ProfileImpl(BasicProperties aProp)

ProfileImpl

public ProfileImpl()
Creates a Profile implementation with the default configuration for launching a main-container on the localhost, RMI internal Message Transport Protocol, port number 1099, iiop MTP.

ProfileImpl

public ProfileImpl(java.lang.String host,
                   int port,
                   java.lang.String platformID)
This constructor creates a default Profile for launching a platform.
Parameters:
host - is the name of the host where the main-container should be listen to. A null value means use the default (i.e. localhost)
port - is the port number where the main-container should be listen for other containers. A negative value should be used for using the default port number.
platformID - is the synbolic name of the platform, if different from default. A null value means use the default (i.e. localhost)
Method Detail

updatePlatformID

public void updatePlatformID()

getProperties

public BasicProperties getProperties()
Return the underlying properties collection.
Returns:
BasicProperties The properties collection.

setParameter

public void setParameter(java.lang.String key,
                         java.lang.String value)
Assign the given value to the given property name.
Overrides:
setParameter in class Profile
Parameters:
key - is the property name
value - is the property value

setSpecifiers

public void setSpecifiers(java.lang.String key,
                          List value)
Assign the given property value to the given property name
Overrides:
setSpecifiers in class Profile
Parameters:
key - is the property name
value - is the property value

getPlatform

protected jade.core.Platform getPlatform()
                                  throws ProfileException
Overrides:
getPlatform in class Profile

getIMTPManager

protected IMTPManager getIMTPManager()
                              throws ProfileException
Overrides:
getIMTPManager in class Profile

getAcc

protected jade.core.acc getAcc()
                        throws ProfileException
Overrides:
getAcc in class Profile

getMobilityManager

protected jade.core.MobilityManager getMobilityManager()
                                                throws ProfileException
Overrides:
getMobilityManager in class Profile

getResourceManager

protected jade.core.ResourceManager getResourceManager()
                                                throws ProfileException
Overrides:
getResourceManager in class Profile

getNotificationManager

protected jade.core.NotificationManager getNotificationManager()
                                                        throws ProfileException
Overrides:
getNotificationManager in class Profile

getPwdDialog

public jade.security.PwdDialog getPwdDialog()
                                     throws ProfileException

getParameter

public java.lang.String getParameter(java.lang.String key,
                                     java.lang.String aDefault)
Retrieve a String value from the configuration properties. If no parameter corresponding to the specified key is found, return the provided default.
Overrides:
getParameter in class Profile
Parameters:
key - The key identifying the parameter to be retrieved among the configuration properties.

getSpecifiers

public List getSpecifiers(java.lang.String key)
                   throws ProfileException
Retrieve a list of Specifiers from the configuration properties. Agents, MTPs and other items are specified among the configuration properties in this way. If no list of Specifiers corresponding to the specified key is found, an empty list is returned.
Overrides:
getSpecifiers in class Profile
Parameters:
key - The key identifying the list of Specifiers to be retrieved among the configuration properties.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object