Package com.sun.enterprise.v3.server
Class SnifferManagerImpl
- java.lang.Object
-
- com.sun.enterprise.v3.server.SnifferManagerImpl
-
- All Implemented Interfaces:
SnifferManager
@Service public class SnifferManagerImpl extends Object implements SnifferManager
Provide convenience methods to deal withSniffer
s in the system.- Author:
- Kohsuke Kawaguchi
-
-
Field Summary
Fields Modifier and Type Field Description protected org.glassfish.hk2.api.ServiceLocator
habitat
-
Constructor Summary
Constructors Constructor Description SnifferManagerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Sniffer
getSniffer(String appType)
Return a sniffer instance based on its registered nameCollection<Sniffer>
getSniffers()
Returns all the presently registered sniffersCollection<Sniffer>
getSniffers(DeploymentContext context)
Returns a collection of sniffers that recognized some parts of the passed archive as components their container handle.Collection<Sniffer>
getSniffers(DeploymentContext context, List<URI> uris, org.glassfish.hk2.classmodel.reflect.Types types)
boolean
hasNoSniffers()
Check if there's anySniffer
installed at all.void
validateSniffers(Collection<? extends Sniffer> snifferCol, DeploymentContext context)
-
-
-
Method Detail
-
getSniffers
public Collection<Sniffer> getSniffers()
Returns all the presently registered sniffers- Specified by:
getSniffers
in interfaceSnifferManager
- Returns:
- Collection (possibly empty but never null) of Sniffer
-
hasNoSniffers
public final boolean hasNoSniffers()
Check if there's anySniffer
installed at all.- Specified by:
hasNoSniffers
in interfaceSnifferManager
- Returns:
- true if not sniffer is registered
-
getSniffer
public Sniffer getSniffer(String appType)
Description copied from interface:SnifferManager
Return a sniffer instance based on its registered name- Specified by:
getSniffer
in interfaceSnifferManager
- Parameters:
appType
- the sniffer service registration name- Returns:
- the sniffer instance of null if not found.
-
getSniffers
public Collection<Sniffer> getSniffers(DeploymentContext context)
Returns a collection of sniffers that recognized some parts of the passed archive as components their container handle. If no sniffer recognize the passed archive, an empty collection is returned.- Specified by:
getSniffers
in interfaceSnifferManager
- Parameters:
context
- the deployment context- Returns:
- possibly empty collection of sniffers that handle the passed archive.
-
getSniffers
public Collection<Sniffer> getSniffers(DeploymentContext context, List<URI> uris, org.glassfish.hk2.classmodel.reflect.Types types)
- Specified by:
getSniffers
in interfaceSnifferManager
-
validateSniffers
public void validateSniffers(Collection<? extends Sniffer> snifferCol, DeploymentContext context)
-
-