|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.services.binding.ServiceBindingMetadata
public class ServiceBindingMetadata
Metadata about a ServiceBinding
that management tools can use. Does
not represent the runtime binding information, but rather the metadata
used to create the binding.
Constructor Summary | |
---|---|
ServiceBindingMetadata()
Create a new ServiceBindingMetadata. |
|
ServiceBindingMetadata(ServiceBinding binding)
Create a new ServiceBindingMetadata from a runtime ServiceBinding. |
|
ServiceBindingMetadata(ServiceBindingMetadata binding)
Copy constructor. |
|
ServiceBindingMetadata(String serviceName)
Create a new ServiceBindingMetadata with given service name. |
|
ServiceBindingMetadata(String serviceName,
String bindingName)
Create a new ServiceBindingMetadata with given service and binding names. |
|
ServiceBindingMetadata(String serviceName,
String bindingName,
String hostName,
int port)
Create a new ServiceBindingMetadata with given property values and a non-fixed port . |
|
ServiceBindingMetadata(String serviceName,
String bindingName,
String hostName,
int port,
boolean fixedPort,
boolean fixedHostName)
Create a new ServiceBindingMetadata with given property values. |
Method Summary | |
---|---|
static String |
canonicalizeServiceName(String serviceName)
Checks if serviceName can be converted into an
ObjectName; if it can, converts it and returns its canonical form. |
int |
compareTo(ServiceBindingMetadata other)
|
boolean |
equals(Object obj)
Equality is based on our serviceName and our bindingName. |
String |
getBindingName()
Gets a qualifier identifying which particular binding within the service this is. |
String |
getDescription()
Gets a description of the binding suitable for display by management tools. |
String |
getFullyQualifiedName()
Gets the fully qualified binding name. |
String |
getHostName()
Gets the host name or string notation IP address to use for the binding. |
int |
getPort()
|
ServiceBindingValueSource |
getServiceBindingValueSource()
Gets the object that can return this ServiceBinding's values in formats usable by consumers. |
String |
getServiceBindingValueSourceClassName()
Gets the fully qualified class name of the serviceBindingValueSource . |
Object |
getServiceBindingValueSourceConfig()
Gets the configuration object the serviceBindingValueSource
should use. |
String |
getServiceName()
Gets the name of the service to which this binding applies. |
int |
hashCode()
Hashcode is based on our serviceName and our bindingName. |
boolean |
isFixedHostName()
Gets whether runtime @{link ServiceBinding}s created from this metadata can alter the hostName value based on the server on which the binding is running. |
boolean |
isFixedPort()
Gets whether runtime @{link ServiceBinding}s created from this metadata can alter the port value based on the server on which the binding is running. |
void |
setBindingName(String bindingName)
Sets a qualifier identifying which particular binding within the service this is. |
void |
setDescription(String description)
Sets a description of the binding suitable for display by management tools. |
void |
setFixedHostName(boolean fixedHostName)
Sets whether runtime @{link ServiceBinding}s created from this metadata can alter the hostName value based on the server on which the binding is running. |
void |
setFixedPort(boolean fixedPort)
Sets whether runtime @{link ServiceBinding}s created from this metadata can alter the port value based on the server on which the binding is running. |
void |
setHostName(String hostName)
Sets the host name or string notation IP address to use for the binding. |
void |
setPort(int port)
Sets the port to use for the binding. |
void |
setServiceBindingValueSource(ServiceBindingValueSource serviceBindingValueSource)
Sets the object that can return this ServiceBinding's values in formats usable by consumers. |
void |
setServiceBindingValueSourceClassName(String serviceBindingValueSourceClassName)
Sets the fully qualified class name of the serviceBindingValueSource . |
void |
setServiceBindingValueSourceConfig(Object serviceBindingValueSourceConfig)
Sets the configuration object the serviceBindingValueSource
should use. |
void |
setServiceName(String serviceName)
Sets the name of the service to which this binding applies. |
String |
toString()
Create string representation of the service descriptor |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ServiceBindingMetadata()
public ServiceBindingMetadata(String serviceName)
serviceName
- the name of the service to which this binding applies.
Cannot be null
IllegalArgumentException
- if serviceName
is null
public ServiceBindingMetadata(String serviceName, String bindingName)
serviceName
- the name of the service to which this binding applies.
Cannot be null
bindingName
- qualifier identifying which particular binding within
the service this is. May be null
IllegalArgumentException
- if serviceName
is null
public ServiceBindingMetadata(String serviceName, String bindingName, String hostName, int port)
port
. The
hostname is fixed
if the provided hostName
is not null
.
serviceName
- the name of the service to which this binding applies.
Cannot be null
bindingName
- qualifier identifying which particular binding within
the service this is. May be null
hostName
- the host name or string notation IP address of the
interface to bind toport
- the port to bind to
IllegalArgumentException
- if serviceName
is null
public ServiceBindingMetadata(String serviceName, String bindingName, String hostName, int port, boolean fixedPort, boolean fixedHostName)
serviceName
- the name of the service to which this binding applies.
Cannot be null
bindingName
- qualifier identifying which particular binding within
the service this is. May be null
hostName
- the host name or string notation IP address of the
interface to bind toport
- the port to bind tofixedPort
- whether runtime @{link ServiceBinding}s created from this
metadata can alter the port value based on the server
on which the binding is running.fixedHostName
- whether runtime @{link ServiceBinding}s created from
this metadata can alter the hostName value based on
the server on which the binding is running.
IllegalArgumentException
- if serviceName
is null
public ServiceBindingMetadata(ServiceBinding binding)
binding
- the binding. Cannot be null
public ServiceBindingMetadata(ServiceBindingMetadata binding)
binding
- the metadata to copy. Cannot be null
Method Detail |
---|
public static String canonicalizeServiceName(String serviceName)
serviceName
can be converted into an
ObjectName; if it can, converts it and returns its canonical form.
serviceName
- the service name
serviceName
if it
cannot be converted into an ObjectName.public String getServiceName()
public void setServiceName(String serviceName)
serviceName
- the name. Cannot be null
.
IllegalArgumentException
- if serviceName
is null
public String getBindingName()
the service
this is.
null
if this is an unnamed default binding
for the service.public void setBindingName(String bindingName)
the service
this is.
bindingName
- the name, or null
if this is an unnamed
default binding for the service.public String getFullyQualifiedName()
serviceName
:bindingName
or
just the service name if the binding name is null
.
IllegalStateException
- if serviceName
is null
public String getHostName()
null
public void setHostName(String hostName)
hostName
- the hostname or address. May be null
public int getPort()
public void setPort(int port)
port
- the portpublic String getDescription()
null
if there isn't onepublic void setDescription(String description)
description
- the description; may be null
public ServiceBindingValueSource getServiceBindingValueSource()
ServiceBindingManager
will use
reasonable defaults based on the format requested by the consumer.
null
public void setServiceBindingValueSource(ServiceBindingValueSource serviceBindingValueSource)
serviceBindingValueSource
- the ServiceBindingValueSource; may be null
public String getServiceBindingValueSourceClassName()
serviceBindingValueSource
.
null
public void setServiceBindingValueSourceClassName(String serviceBindingValueSourceClassName)
serviceBindingValueSource
.
serviceBindingValueSourceClassName
- the binding value source class, or null
public Object getServiceBindingValueSourceConfig()
serviceBindingValueSource
should use.
null
public void setServiceBindingValueSourceConfig(Object serviceBindingValueSourceConfig)
serviceBindingValueSource
should use.
serviceBindingValueSourceConfig
- the configuration object, or null
public boolean isFixedPort()
true
if the getPort()
value from this
object must be respected; false
if it can be
altered.public void setFixedPort(boolean fixedPort)
true
if the getPort()
value from this
object must be respected; false
if it can be
altered.
public boolean isFixedHostName()
true
if the getHostName()
value from this
object must be respected; false
if it can be
altered.public void setFixedHostName(boolean fixedHostName)
true
if the getHostName()
value
from this object must be respected; false
if it can be altered.
public int compareTo(ServiceBindingMetadata other)
compareTo
in interface Comparable<ServiceBindingMetadata>
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |