Class AbstractProxyRestAdapter
- java.lang.Object
-
- org.glassfish.admin.restconnector.AbstractProxyRestAdapter
-
- All Implemented Interfaces:
Adapter
- Direct Known Subclasses:
ProxyRestCommandAdapter
,ProxyRestManagementAdapter
,ProxyRestMonitoringAdapter
public abstract class AbstractProxyRestAdapter extends Object implements Adapter
Base class for our implementation of Adapter proxies. To avoid early loading of adapter implentations, use a handle-body idiom here. Only operations related to metadata is handled by this class. The rest of the operations are delegated to a delegate which is looked up in the service registry on demand.- Author:
- [email protected]
-
-
Constructor Summary
Constructors Constructor Description AbstractProxyRestAdapter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract Config
getConfig()
abstract String
getContextRoot()
Context root this adapter is responsible for handling.org.glassfish.grizzly.http.server.HttpHandler
getHttpService()
Get the underlying GrizzlyHttpHandler
.InetAddress
getListenAddress()
int
getListenPort()
Returns the listener port for this adapterprotected abstract String
getName()
protected abstract org.glassfish.hk2.api.ServiceLocator
getServices()
List<String>
getVirtualServers()
Returns the virtual servers supported by this adapterboolean
isRegistered()
Checks whether this adapter has been registered as a network endpoint.void
setRegistered(boolean registered)
Marks this adapter as having been registered or unregistered as a network endpoint
-
-
-
Method Detail
-
getServices
protected abstract org.glassfish.hk2.api.ServiceLocator getServices()
-
getConfig
protected abstract Config getConfig()
-
getName
protected abstract String getName()
-
getHttpService
public org.glassfish.grizzly.http.server.HttpHandler getHttpService()
Description copied from interface:Adapter
Get the underlying GrizzlyHttpHandler
.- Specified by:
getHttpService
in interfaceAdapter
- Returns:
- the underlying Grizzly
HttpHandler
.
-
getContextRoot
public abstract String getContextRoot()
Context root this adapter is responsible for handling.- Specified by:
getContextRoot
in interfaceAdapter
- Returns:
- context root
-
getListenPort
public int getListenPort()
Description copied from interface:Adapter
Returns the listener port for this adapter- Specified by:
getListenPort
in interfaceAdapter
- Returns:
- listener port
-
getListenAddress
public InetAddress getListenAddress()
- Specified by:
getListenAddress
in interfaceAdapter
- Returns:
- the
InetAddress
on which this adapter is listening
-
getVirtualServers
public List<String> getVirtualServers()
Description copied from interface:Adapter
Returns the virtual servers supported by this adapter- Specified by:
getVirtualServers
in interfaceAdapter
- Returns:
- List<String> the virtual server list supported by the adapter
-
isRegistered
public boolean isRegistered()
Description copied from interface:Adapter
Checks whether this adapter has been registered as a network endpoint.- Specified by:
isRegistered
in interfaceAdapter
-
setRegistered
public void setRegistered(boolean registered)
Description copied from interface:Adapter
Marks this adapter as having been registered or unregistered as a network endpoint- Specified by:
setRegistered
in interfaceAdapter
-
-