org.rhq.enterprise.server.plugin.pc
Class ServerPluginType

java.lang.Object
  extended by org.rhq.enterprise.server.plugin.pc.ServerPluginType

public class ServerPluginType
extends Object

Defines the types of server-side plugins that are currently supported. Server side plugin types are identified uniquely by their plugin descriptor types.

Author:
John Mazzitelli

Constructor Summary
ServerPluginType(Class<? extends ServerPluginDescriptorType> descriptorType)
          Given a type of plugin descriptor, this will create a plugin type that represents that kind of plugin.
ServerPluginType(ServerPluginDescriptorType descriptor)
          Given an actual plugin descriptor object, this will create a plugin type that represents that kind of plugin.
ServerPluginType(String stringifiedType)
          Given a string that was returned by a call to stringify(), this will create its server plugin type.
 
Method Summary
 boolean equals(Object obj)
           
 Class<? extends ServerPluginDescriptorType> getDescriptorType()
           
 int hashCode()
           
 String stringify()
          Returns a "serialized" form of this instance by returning a string representation of the type.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ServerPluginType

public ServerPluginType(ServerPluginDescriptorType descriptor)
Given an actual plugin descriptor object, this will create a plugin type that represents that kind of plugin.

Parameters:
descriptor - an actual descriptor parsed from a plugin

ServerPluginType

public ServerPluginType(Class<? extends ServerPluginDescriptorType> descriptorType)
Given a type of plugin descriptor, this will create a plugin type that represents that kind of plugin.

Parameters:
descriptorType -

ServerPluginType

public ServerPluginType(String stringifiedType)
                 throws Exception
Given a string that was returned by a call to stringify(), this will create its server plugin type.

Parameters:
stringifiedType - string representation of a server plugin type.
Throws:
Exception - if the string was invalid
Method Detail

getDescriptorType

public Class<? extends ServerPluginDescriptorType> getDescriptorType()

stringify

public String stringify()
Returns a "serialized" form of this instance by returning a string representation of the type. This is not the same as toString(). The returned string can be used to reconstitute the type via the constructor ServerPluginType(String).

Returns:
string representation of this type

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.