Methods Summary |
---|
public java.lang.String | debugString()
String s = "";
if (connected) {
s = "Connected ";
}
return s + "Server " + getHostName() + ":" + (getPort()!=null?getPort():"DefaultPort") + "; Name: " + appServer;
|
public boolean | equals(java.lang.Object other)
if (other instanceof SunTarget) {
SunTarget theOther = (SunTarget) other;
return (connectionInfo.equals(theOther.connectionInfo)
&& getName() != null && getName().equals(theOther.getName())
&& getTargetType() != null && getTargetType().equals(theOther.getTargetType()));
}
return false;
|
public java.lang.String | exportClientStubs(java.lang.String appName, int appType, java.lang.String destDir)Exports the Client stub jar to the given location.
try{
return DeploymentClientUtils.downloadClientStubs(
appName, destDir, dasConnection);
}catch(Exception e){
e.printStackTrace();
throw new AFException(e.getMessage());
}
|
public java.lang.String | getAppServerInstance()
return appServer;
|
public com.sun.enterprise.deployment.client.ServerConnectionIdentifier | getConnectionInfo()
return connectionInfo;
|
public com.sun.appserv.management.client.ConnectionSource | getConnectionSource()
return this.dasConnection;
|
public java.lang.String | getDescription()Retrieve other descriptive information
about the target.
//@@@ or connect to the server for a full version
String version = localStrings.getString(
"enterprise.deployapi.spi.ProductVersion", "9.0");
return localStrings.getString(
"enterprise.deployapi.spi.suntargetdescription",
version, getHostName());
|
public java.lang.String | getHostName()
return connectionInfo.getHostName();
|
public javax.management.MBeanServerConnection | getMBeanServerConnection()
return this.dasConnection.getExistingMBeanServerConnection();
|
public java.lang.String | getName()Retrieve the name of the target server.
return appServer;
|
public java.lang.String | getPort()
return (new Integer(connectionInfo.getHostPort())).toString();
|
public java.lang.String | getTargetType()
return this.targetType;
|
public int | hashCode()
int result = 17;
result = 37 * result + ((connectionInfo == null) ? 0 : connectionInfo.hashCode());
result = 37 * result + ((getName() == null) ? 0 : getName().hashCode());
result = 37 * result + ((getTargetType() == null) ? 0 : getTargetType().hashCode());
return result;
|
public boolean | isConnected()
return connected;
|
public boolean | isDAS()Returns whether this target is a DAS.
return (appServer.equals(DAS_TARGET_NAME));
|
public boolean | isManagedBySameDAS(java.lang.Object other)
if (other instanceof SunTarget) {
SunTarget theOther = (SunTarget) other;
return connectionInfo.equals(theOther.connectionInfo);
}
return false;
|
public void | release()Release our ressources
connected=false;
|
public void | setAppServerInstance(java.lang.String appServer)Set the application server instance associated with this target
this.appServer = appServer;
|
public void | setConnectionSource(com.sun.appserv.management.client.ConnectionSource conn)
this.dasConnection = conn;
|
public void | setTargetType(java.lang.String type)Set the type of this target
this.targetType = type;
|
public java.lang.String | toString()
return getHostName() + ":" + (getPort()!=null?getPort():"DefaultPort") + "_" + appServer;
|