Examples of IAgentopiaConnection


Examples of net.sf.agentopia.platform.IAgentopiaConnection

        logStatus("Going to all " + exitList.length + " known hosts.");

        // For each exit, try to transfer.
        // This means copying myself a lot.
        for (int pos = 0; pos < exitList.length; pos++) {
            final IAgentopiaConnection exit = exitList[pos];
            if (!this.placeList.contains(exit.getTargetId())) {
                try {
                    goExit(exit);
                }
                catch (IOException exc) {
                    getLogger().warn("Sorry. Could not transfer myself to host \"" + exit + "\": " + exc.getMessage());
View Full Code Here

Examples of net.sf.agentopia.platform.IAgentopiaConnection

        controller.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent evt) {
                int eventId = evt.getID();
                DefaultListModel listModel = (DefaultListModel) getExitList().getModel();
                IAgentopiaConnection exit;

                // Decide on event id.
                switch (eventId) {
                    case AgentopiaConstants.ACTION_EXIT_ADDED :
                        exit = (IAgentopiaConnection) evt.getSource();
View Full Code Here

Examples of net.sf.agentopia.platform.IAgentopiaConnection

     *
     * @param agent The agent to jump start.
     * @throws IOException
     */
    public void jumpStart(IAgentopiaAgent agent) throws IOException {
        IAgentopiaConnection comm = createDirectConnection(this.hostId, AgentopiaConstants.HEADER_AGENT);
        int intFlag = comm.readInt();
        if (AgentopiaConstants.HEADER_AGENT != intFlag) {
            throw new IOException("HEADER_AGENT flag expected as affirmation.");
        }
        comm.transferMe(agent);
        comm.shutDown();
        agent.shutDown();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.