eu.larkc.core.endpoint.test
Class TestEndpointMain

java.lang.Object
  extended by eu.larkc.core.endpoint.Endpoint
      extended by eu.larkc.core.endpoint.test.TestEndpointMain
All Implemented Interfaces:
com.sun.net.httpserver.HttpHandler

public class TestEndpointMain
extends Endpoint

This class represents a very simple endpoint for testing.

Author:
norlan

Constructor Summary
TestEndpointMain(Executor ex)
          Custom constructor
 
Method Summary
 void handle(com.sun.net.httpserver.HttpExchange arg0)
           
static void main(java.lang.String[] args)
          Main method for manual testing.
 void start(int port)
          Starts the endpoint.
 void stop()
          Stops the endpoint.
 
Methods inherited from class eu.larkc.core.endpoint.Endpoint
getExecutor, getPipeId, getPort, getURI, isInitialized, setPipeId, setPort
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestEndpointMain

public TestEndpointMain(Executor ex)
Custom constructor

Parameters:
ex - the executor
Method Detail

start

public void start(int port)
           throws EndpointException
Description copied from class: Endpoint
Starts the endpoint.

Overrides:
start in class Endpoint
Throws:
EndpointException - on endpoint initialization error

stop

public void stop()
          throws EndpointShutdownException
Description copied from class: Endpoint
Stops the endpoint.

Overrides:
stop in class Endpoint
Throws:
EndpointShutdownException - on endpoint shutdown error (if the server could not be stopped, etc.)

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Main method for manual testing.

Parameters:
args - unused
Throws:
java.lang.Exception

handle

public void handle(com.sun.net.httpserver.HttpExchange arg0)
            throws java.io.IOException
Throws:
java.io.IOException