eu.larkc.core.endpoint
Class Endpoint

java.lang.Object
  extended by eu.larkc.core.endpoint.Endpoint
All Implemented Interfaces:
com.sun.net.httpserver.HttpHandler
Direct Known Subclasses:
PushEndpoint, SparqlHandler, TestEndpointMain

public abstract class Endpoint
extends java.lang.Object
implements com.sun.net.httpserver.HttpHandler

Interface that all endpoints have to implement.

Author:
Blaz Fortuna, norlan, Luka Bradesko, Christoph Fuchs

Constructor Summary
Endpoint(Executor ex, java.lang.String _urlContext)
          Constructs and gives the name to the plug-in.
 
Method Summary
 Executor getExecutor()
          Getter.
 java.lang.String getPipeId()
          Getter.
 int getPort()
          Getter.
 org.openrdf.model.URI getURI()
          Returns the URI of this endpoint.
static boolean isInitialized()
          Determines if the management interface is initialized.
 void setPipeId(java.lang.String pipeId)
          Setter.
 void setPort(int port)
          Setter.
 void start(int _port)
          Starts the endpoint.
 void stop()
          Stops the endpoint.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.sun.net.httpserver.HttpHandler
handle
 

Constructor Detail

Endpoint

public Endpoint(Executor ex,
                java.lang.String _urlContext)
Constructs and gives the name to the plug-in.

Parameters:
ex - the executor
_urlContext - the url context
Method Detail

stop

public void stop()
          throws EndpointShutdownException
Stops the endpoint.

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

start

public void start(int _port)
           throws EndpointException
Starts the endpoint.

Parameters:
_port -
Throws:
EndpointException - on endpoint initialization error

getURI

public org.openrdf.model.URI getURI()
Returns the URI of this endpoint.

Returns:
the URI

isInitialized

public static boolean isInitialized()
Determines if the management interface is initialized.

Returns:
true if initialized, false if not

getPort

public int getPort()
Getter. Retrieves the port.

Returns:
the port

setPort

public void setPort(int port)
Setter. Sets or updates the port to the passed value.

Parameters:
port - the port to set

getExecutor

public Executor getExecutor()
Getter. Retrieves the executor.

Returns:
the executor

setPipeId

public void setPipeId(java.lang.String pipeId)
Setter. Sets or updates the pipeId to the passed value.

Parameters:
pipeId - the pipeId to set

getPipeId

public java.lang.String getPipeId()
Getter. Retrieves the pipeId.

Returns:
the pipeId