Code Search for Developers
 
 
  

AgentPacket.java from GridBlocks at Krugle


Show AgentPacket.java syntax highlighted

/**
 * Copyright (c) 2006
 * Helsinki Institute of Physics
 * see LICENSE file for details
 *
 * AgentPacket.java
 * Created on Jun 24, 2005
 */
package fi.hip.gb.net.discovery;


/**
 * Container for information about agent service used for discovering purposes. 
 * This container includes information such as supported services, their ids, versions 
 * and various meta-data.
 * 
 * @author Juho Karppinen
 */
public class AgentPacket {
    /** service class name */
    private String serviceClass;

    /** service id and/or version */
    private String serviceID;

    /** service description */
    private String serviceDescription;
    
    /** URL for the service JAR file */
    private String jarURL;
    
    /** a string array of supported servers for this service */
    private DiscoveryPacket[] servers = new DiscoveryPacket[0];
    
    //private static Log log = LogFactory.getLog(AgentPacket.class);
    
    /**
     * Empty constructor needed for serialization
     */
    public AgentPacket() {
    }
    
    /**
     * Creates new packet with the class name of the service
     * @param serviceClass the class name for the service
     */
    public AgentPacket(String serviceClass) {
        this();
        this.serviceClass = serviceClass;
    }
    
    /**
     * Gets the class name of the service.
     * @return returns the service class name.
     */
    public String getServiceClass() {
        return this.serviceClass;
    }
    /**
     * Sets the name of the service.
     * @param serviceClass the class name to set.
     */
    public void setServiceClass(String serviceClass) {
        this.serviceClass = serviceClass;
    }
        
    /**
     * Gets the version identifier of the service
     * @return string presentation of the version, should be identical for the service
     * class and its version
     */
    public String getServiceID() {
        return this.serviceID;
    }
    /**
     * Sets the version identifier of the service
     * @param serviceVersion string presentation of the version, should be identical for the service
     * class and its version
     */
    public void setServiceID(String serviceID) {
        this.serviceID = serviceID;
    }

    /**
     * Gets description about the agent
     * @return description about the purpose of the agent
     * @see fi.hip.gb.mobile.Processor#getType()
     */
    public String getServiceDescription() {
        return this.serviceDescription;
    }
    /**
     * Sets the description about the service
     * @param serviceVersion string presentation of the version, should be identical for the service
     * class and its version
     */
    public void setServiceDescription(String serviceDescription) {
        this.serviceDescription = serviceDescription;
    }
    
    /**
     * Gets the URL of the JAR.
     * @return returns the URL to the JAR package.
     */
    public String getJarURL() {
        return this.jarURL;
    }
    /**
     * Sets the URL of the JAR.
     * @param jarURL the URL to the JAR package.
     */
    public void setJarURL(String jarURL) {
        this.jarURL = jarURL;
    }
    
    /**
     * Gets the list of supported servers for this agent service
     * @return returns a array of servers
     */
    public DiscoveryPacket[] getServers() {
        return this.servers;
    }
    /**
     * Sets the list of supported servers for this agent service
     * @param servers a array of servers
     */
    public void setServers(DiscoveryPacket[] servers) {
        this.servers = servers;
    }
}




See more files for this project here

GridBlocks

GridBlocks builds a grid application framework via easy-to-use building blocks in distributed environment. The framework offers components for Grid security, distributed storage, computing, and Portlet web interfaces.

Project homepage: http://sourceforge.net/projects/gridblocks
Programming language(s): Java,JSP,XML
License: other

  AgentPacket.java
  DiscoveryPacket.java
  DiscoveryService.java
  DiscoveryThread.java
  DiscoveryThreadMBean.java
  JAXR.java