* @param handler an implementation of de.netseeker.ejoe.ServerHandler
* @param port the port EJOE should listen to
*/
public EJServer(final ServerHandler handler, int port)
{
ServerHandlerMapping mapping = null;
if ( handler instanceof ServerHandlerMapping )
{
mapping = (ServerHandlerMapping) handler;
}
else
{
mapping = new ServerHandlerMapping();
mapping.setDefaultHandler( handler );
}
mapping.addHandlerMapping( PingRequest.UNIQUE_NAME, new PingHandler() );
_serverInfo.setHandler( handler );
_serverInfo.setPort( port );
}