org.glassfish.deployapi
Class SunDeploymentFactory

java.lang.Object
  extended by org.glassfish.deployapi.SunDeploymentFactory
All Implemented Interfaces:
DeploymentFactory

public class SunDeploymentFactory
extends Object
implements DeploymentFactory

Concrete implementation of the JSR 88 DeploymentFactory interface.

Author:
dochez, tjquinn

Constructor Summary
SunDeploymentFactory()
          Creates a new instance of SunDeploymentFactory
 
Method Summary
 DeploymentManager getDeploymentManager(String uri, String username, String password)
          Return a connected DeploymentManager instance.
 DeploymentManager getDisconnectedDeploymentManager(String uri)
          Return a disconnected DeploymentManager instance.
 String getDisplayName()
          Provide a string with the name of this vendor's DeploymentManager.
 String getProductVersion()
          Provide a string identifying version of this vendor's DeploymentManager.
 boolean handlesURI(String uri)
          Tests whether this factory can create a DeploymentManager object based on the specificed URI.
 ServerConnectionIdentifier parseURIForHostInfo(String uri)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SunDeploymentFactory

public SunDeploymentFactory()
Creates a new instance of SunDeploymentFactory

Method Detail

getDeploymentManager

public DeploymentManager getDeploymentManager(String uri,
                                              String username,
                                              String password)
                                       throws DeploymentManagerCreationException
Return a connected DeploymentManager instance.

Specified by:
getDeploymentManager in interface DeploymentFactory
Parameters:
uri - The URI that specifies the connection parameters
username - An optional username (may be null if no authentication is required for this platform).
password - An optional password (may be null if no authentication is required for this platform).
Returns:
A ready DeploymentManager instance.
Throws:
DeploymentManagerCreationException - occurs when a DeploymentManager could not be returned (server down, unable to authenticate, etc).

getDisconnectedDeploymentManager

public DeploymentManager getDisconnectedDeploymentManager(String uri)
                                                   throws DeploymentManagerCreationException
Return a disconnected DeploymentManager instance.

Specified by:
getDisconnectedDeploymentManager in interface DeploymentFactory
Parameters:
uri - the uri of the DeploymentManager to return.
Returns:
A DeploymentManager disconnected instance.
Throws:
DeploymentManagerCreationException - occurs if the DeploymentManager could not be created.

getDisplayName

public String getDisplayName()
Provide a string with the name of this vendor's DeploymentManager.

Specified by:
getDisplayName in interface DeploymentFactory
Returns:
the name of the vendor's DeploymentManager.

getProductVersion

public String getProductVersion()
Provide a string identifying version of this vendor's DeploymentManager.

Specified by:
getProductVersion in interface DeploymentFactory
Returns:
the name of the vendor's DeploymentManager.

handlesURI

public boolean handlesURI(String uri)
Tests whether this factory can create a DeploymentManager object based on the specificed URI. This does not indicate whether such an attempt will be successful, only whether the factory can handle the uri.

Specified by:
handlesURI in interface DeploymentFactory
Parameters:
uri - The uri to check
Returns:
true if the factory can handle the uri.

parseURIForHostInfo

public ServerConnectionIdentifier parseURIForHostInfo(String uri)
                                               throws Exception
Returns:
the host name/port from the URI passed see JSR88 paragraph 9.2.3
Throws:
Exception


Copyright © 2012. All Rights Reserved.