org.glassfish.paas.dnsplugin
Class DnsPlugin

java.lang.Object
  extended by org.glassfish.paas.dnsplugin.DnsPlugin
All Implemented Interfaces:
ServicePlugin

@Scoped(value=org.jvnet.hk2.component.PerLookup.class)
@Service
public class DnsPlugin
extends Object
implements ServicePlugin

DNS plugin which can work with bind 9 dns server using nsupdate utility to create or delete domain name entry. Currently creates . entry mapping to load-balancer IP address in DNS.

Author:
Kshitiz Saxena

Constructor Summary
DnsPlugin()
           
 
Method Summary
 void associateServices(Service serviceConsumer, ServiceReference svcRef, Service serviceProvider, boolean beforeDeployment, PaaSDeploymentContext dc)
           
 boolean deploy(PaaSDeploymentContext dc, Service service)
          
 void dissociateServices(Service serviceConsumer, ServiceReference svcRef, Service serviceProvider, boolean beforeUndeploy, PaaSDeploymentContext dc)
           
 ServiceDescription getDefaultServiceDescription(String appName, ServiceReference svcRef)
           
 Set<ServiceDescription> getImplicitServiceDescriptions(ReadableArchive cloudArchive, String appName, PaaSDeploymentContext context)
           
 ProvisionedService getProvisionedService(ServiceDescription serviceDescription, ServiceInfo serviceInfo)
           
 Set getServiceReferences(String appName, ReadableArchive cloudArchive, PaaSDeploymentContext dc)
           
 DnsServiceType getServiceType()
           
 boolean handles(ReadableArchive cloudArchive)
           
 boolean handles(ServiceDescription serviceDescription)
           
 boolean isReferenceTypeSupported(String referenceType)
           
 boolean isRunning(ProvisionedService provisionedSvc)
           
 ProvisionedService match(ServiceReference svcRef)
           
 ProvisionedService provisionService(ServiceDescription serviceDescription, PaaSDeploymentContext dc)
           
 boolean reassociateServices(Service serviceConsumer, Service oldServiceProvider, Service newServiceProvider, ServiceOrchestrator.ReconfigAction reason)
           
 boolean reconfigureServices(ProvisionedService oldPS, ProvisionedService newPS)
           
 ProvisionedService scaleService(ProvisionedService provisionedService, int scaleCount, AllocationStrategy allocStrategy)
           
 ProvisionedService startService(ServiceDescription serviceDescription, ServiceInfo serviceInfo)
           
 boolean stopService(ProvisionedService provisionedSvc, ServiceInfo serviceInfo)
           
 boolean undeploy(PaaSDeploymentContext dc, Service service)
          
 boolean unprovisionService(ServiceDescription serviceDescription, PaaSDeploymentContext dc)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DnsPlugin

public DnsPlugin()
Method Detail

getServiceType

public DnsServiceType getServiceType()
Specified by:
getServiceType in interface ServicePlugin

handles

public boolean handles(ReadableArchive cloudArchive)
Specified by:
handles in interface ServicePlugin

handles

public boolean handles(ServiceDescription serviceDescription)
Specified by:
handles in interface ServicePlugin

isReferenceTypeSupported

public boolean isReferenceTypeSupported(String referenceType)
Specified by:
isReferenceTypeSupported in interface ServicePlugin

getServiceReferences

public Set getServiceReferences(String appName,
                                ReadableArchive cloudArchive,
                                PaaSDeploymentContext dc)
Specified by:
getServiceReferences in interface ServicePlugin

getDefaultServiceDescription

public ServiceDescription getDefaultServiceDescription(String appName,
                                                       ServiceReference svcRef)
Specified by:
getDefaultServiceDescription in interface ServicePlugin

getImplicitServiceDescriptions

public Set<ServiceDescription> getImplicitServiceDescriptions(ReadableArchive cloudArchive,
                                                              String appName,
                                                              PaaSDeploymentContext context)
Specified by:
getImplicitServiceDescriptions in interface ServicePlugin

provisionService

public ProvisionedService provisionService(ServiceDescription serviceDescription,
                                           PaaSDeploymentContext dc)
Specified by:
provisionService in interface ServicePlugin

getProvisionedService

public ProvisionedService getProvisionedService(ServiceDescription serviceDescription,
                                                ServiceInfo serviceInfo)
Specified by:
getProvisionedService in interface ServicePlugin

unprovisionService

public boolean unprovisionService(ServiceDescription serviceDescription,
                                  PaaSDeploymentContext dc)
Specified by:
unprovisionService in interface ServicePlugin

deploy

public boolean deploy(PaaSDeploymentContext dc,
                      Service service)

Specified by:
deploy in interface ServicePlugin

undeploy

public boolean undeploy(PaaSDeploymentContext dc,
                        Service service)

Specified by:
undeploy in interface ServicePlugin

startService

public ProvisionedService startService(ServiceDescription serviceDescription,
                                       ServiceInfo serviceInfo)
Specified by:
startService in interface ServicePlugin

stopService

public boolean stopService(ProvisionedService provisionedSvc,
                           ServiceInfo serviceInfo)
Specified by:
stopService in interface ServicePlugin

isRunning

public boolean isRunning(ProvisionedService provisionedSvc)
Specified by:
isRunning in interface ServicePlugin

match

public ProvisionedService match(ServiceReference svcRef)
Specified by:
match in interface ServicePlugin

scaleService

public ProvisionedService scaleService(ProvisionedService provisionedService,
                                       int scaleCount,
                                       AllocationStrategy allocStrategy)
Specified by:
scaleService in interface ServicePlugin

reconfigureServices

public boolean reconfigureServices(ProvisionedService oldPS,
                                   ProvisionedService newPS)
Specified by:
reconfigureServices in interface ServicePlugin

associateServices

public void associateServices(Service serviceConsumer,
                              ServiceReference svcRef,
                              Service serviceProvider,
                              boolean beforeDeployment,
                              PaaSDeploymentContext dc)
Specified by:
associateServices in interface ServicePlugin

dissociateServices

public void dissociateServices(Service serviceConsumer,
                               ServiceReference svcRef,
                               Service serviceProvider,
                               boolean beforeUndeploy,
                               PaaSDeploymentContext dc)
Specified by:
dissociateServices in interface ServicePlugin

reassociateServices

public boolean reassociateServices(Service serviceConsumer,
                                   Service oldServiceProvider,
                                   Service newServiceProvider,
                                   ServiceOrchestrator.ReconfigAction reason)
Specified by:
reassociateServices in interface ServicePlugin


Copyright © 2012. All Rights Reserved.