Skip navigation links

Oracle® Coherence Java API Reference
Release 12.1.2.0.3

E26043-02


com.tangosol.coherence.rest.server
Interface HttpServer

All Known Implementing Classes:
AbstractHttpServer, DefaultHttpServer, GrizzlyHttpServer, SimpleHttpServer

public interface HttpServer

An interface implemented by embedded HTTP servers.

Author:
as 2011.06.03

Method Summary
 void setAuthMethod(java.lang.String sMethod)
          Set the client authentication method to use.
 void setCacheFactory(ConfigurableCacheFactory cacheFactory)
          Set ConfigurableCacheFactory to use.
 void setLocalAddress(java.lang.String sAddr)
          Set the address server should listen on.
 void setLocalPort(int nPort)
          Set the port number server should listen on.
 void setParentService(Service service)
          Set the Service that is embedding this HttpServer.
 void setResourceConfig(java.util.Map mapConfig)
          Set the map of Jersey ResourceConfig to use.
 void setResourceConfig(com.sun.jersey.api.core.ResourceConfig config)
          Set the Jersey ResourceConfig to use.
 void setSocketProvider(com.oracle.common.net.SocketProvider provider)
          Set the SocketProvider to use.
 void start()
          Start the server.
 void stop()
          Stop the server.

 

Method Detail

setAuthMethod

void setAuthMethod(java.lang.String sMethod)
Set the client authentication method to use.

Valid values basic for HTTP basic authentication, cert for client certificate authentication, cert+basic for both client certificate and HTTP basic authentication, and none for no authentication.

Parameters:
sMethod - the authentication method to use

setCacheFactory

void setCacheFactory(ConfigurableCacheFactory cacheFactory)
Set ConfigurableCacheFactory to use.
Parameters:
cacheFactory - the cache factory

setLocalAddress

void setLocalAddress(java.lang.String sAddr)
Set the address server should listen on.
Parameters:
sAddr - the address

setLocalPort

void setLocalPort(int nPort)
Set the port number server should listen on.
Parameters:
nPort - the port number

setParentService

void setParentService(Service service)
Set the Service that is embedding this HttpServer.
Parameters:
service - the parent service

setResourceConfig

void setResourceConfig(com.sun.jersey.api.core.ResourceConfig config)
Set the Jersey ResourceConfig to use.

This method will register specified application under the root context, which is equivalent to: setResourceConfig(Collections.singletonMap("/", config));

Parameters:
config - the resource config for a Jersey web application

setResourceConfig

void setResourceConfig(java.util.Map mapConfig)
Set the map of Jersey ResourceConfig to use.
Parameters:
mapConfig - the map of context names to corresponding Jersey resource configs to use

setSocketProvider

void setSocketProvider(com.oracle.common.net.SocketProvider provider)
Set the SocketProvider to use.
Parameters:
provider - the SocketProvider

start

void start()
           throws java.io.IOException
Start the server.
Throws:
java.io.IOException - if an error occurs

stop

void stop()
          throws java.io.IOException
Stop the server.
Throws:
java.io.IOException - if an error occurs

Skip navigation links

Oracle® Coherence Java API Reference
Release 12.1.2.0.3

E26043-02


Copyright © 2000, 2014, Oracle and/or its affiliates. All rights reserved.