/*******************************************************************************
 * Copyright (c) 2016 AgentLab.
 *
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *******************************************************************************/
package ru.agentlab.maia;

import java.util.Collection;
import java.util.Map;
import java.util.UUID;

import ru.agentlab.maia.exception.ContainerException;
import ru.agentlab.maia.exception.InjectorException;
import ru.agentlab.maia.exception.ResolveException;

/**
 * @author Dmitry Shishkin
 */
public interface IAgent {

	void start();

	void stop();

	UUID getUuid();

	IContainer getContainer();

	AgentState getState();

	Collection<Object> getRoles();

	void deployTo(IContainer container) throws InjectorException, ContainerException;

	Object addRole(Class<?> roleClass, Map<String, Object> parameters) throws ResolveException;

	void send(IMessage message);

}

@@ -73,17 +73,16 @@
 ********
-%0D
 %0A * Copy
@@ -109,13 +109,11 @@
 Lab.
-%0D
 %0A *
-%0D
 %0A * 
@@ -176,17 +176,16 @@
 aterials
-%0D
 %0A * are 
@@ -249,17 +249,16 @@
 nse v1.0
-%0D
 %0A * whic
@@ -309,17 +309,16 @@
 lable at
-%0D
 %0A * http
@@ -354,17 +354,16 @@
 v10.html
-%0D
 %0A ******
@@ -436,17 +436,16 @@
 *******/
-%0D
 %0Apackage
@@ -462,19 +462,17 @@
 ab.maia;
-%0D%0A%0D
+%0A
 %0Aimport 
@@ -488,25 +488,24 @@
 .Collection;
-%0D
 %0Aimport java
@@ -514,17 +514,16 @@
 til.Map;
-%0D
 %0Aimport 
@@ -537,19 +537,17 @@
 il.UUID;
-%0D%0A%0D
+%0A
 %0Aimport 
@@ -584,33 +584,32 @@
 tainerException;
-%0D
 %0Aimport ru.agent
@@ -645,17 +645,16 @@
 ception;
-%0D
 %0Aimport 
@@ -701,16 +701,13 @@
 ion;
-%0D%0A%0D
+%0A
 %0A/**
-%0D
 %0A * 
@@ -733,14 +733,12 @@
 hkin
-%0D
 %0A */
-%0D
 %0Apub
@@ -759,19 +759,17 @@
 IAgent %7B
-%0D%0A%0D
+%0A
 %0A%09void s
@@ -775,19 +775,17 @@
 start();
-%0D%0A%0D
+%0A
 %0A%09void s
@@ -790,19 +790,17 @@
  stop();
-%0D%0A%0D
+%0A
 %0A%09UUID g
@@ -808,19 +808,17 @@
 tUuid();
-%0D%0A%0D
+%0A
 %0A%09IConta
@@ -837,19 +837,17 @@
 ainer();
-%0D%0A%0D
+%0A
 %0A%09AgentS
@@ -862,19 +862,17 @@
 State();
-%0D%0A%0D
+%0A
 %0A%09Collec
@@ -895,19 +895,17 @@
 Roles();
-%0D%0A%0D
+%0A
 %0A%09void d
@@ -979,19 +979,17 @@
 ception;
-%0D%0A%0D
+%0A
 %0A%09Object
@@ -1073,19 +1073,126 @@
 ception;
-%0D%0A%0D
+%0A%0A%09default Object addRole(Class%3C?%3E roleClass) throws ResolveException %7B%0A%09%09return addRole(roleClass, null);%0A%09%7D%0A
 %0A%09void s
@@ -1217,11 +1217,8 @@
 ge);
-%0D%0A%0D
+%0A
 %0A%7D
-%0D
 %0A

Add default method