Skip to content
bleujin edited this page Apr 15, 2013 · 9 revisions

Before Getting Started

  • Required : JDK 1.6 Higher
  • ref Lib : ant, apache-common, iframework, jci, netty, restlet

Writing a HelloServer

public class TestAradon {
	public static void main(String[] args) throws Exception {
		Configuration config = ConfigurationBuilder.newBuilder().aradon()
			.sections().restSection("")
				.path("hello")
					.addUrlPattern("/hello")
					.addUrlPattern("/hello/{name}")
					.handler(HelloWorldLet.class).build();
		// Configuration config = ConfigurationBuilder
		// 	.load(XMLConfig.create("./aradon-config.xml")).build();
		Aradon aradon = Aradon.create(config);
		aradon.startServer(9000);
	}
}
 
class HelloWorldLet extends AbstractServerResource {
	@Get
	public String myGet(@PathParam(value = "name") String name) {
		return "hello, " + name;
	}
}

Core Component

Aradon은 아래와 같은 구조로 되어 있다.[참고 : aradon-config.xml]

<root>
    <context />
    <prefilter />
    <afterfilter />
    <section>
        <context />
        <prefilter />
        <afterfilter />
        <path>
            <context />
            <prefilter />
            <afterfilter />
            <urls />
            <handler />
        </path>
    </section>
</root>

Aradon은 한개의 root를 가지며 root는 n개의 Section을 가지며 Section은 n개의 Path를 가진다. http://address:port//[section]/[pathUrl]의 계층형 서비스 방식으로 해석한다.

Let(Aradon, Section, PathLet)

Attribute & Form Parameter

Context

Filter

Representation

Testing Let

RIAP

AradonTester

Configuration

Logging

Server Parameter

Engine

ServerRunner

AradonClient

BasicRequest

SerialRequest

Authentication

SSL

Shutdown Your Application

Summary

Clone this wiki locally