public class ReplicaCatalog extends AbstractSiteData
Modifier and Type | Field and Description |
---|---|
protected Set<String> |
mAliases
Set of alias names to be used for lookup.
|
protected Collection<Connection> |
mConnectionParams
Collection of connection parameters to use for connecting to that replica
catalog.
|
protected String |
mType
The type of the replica catalog implementation to use.
|
protected String |
mURL
The url for the catalog.
|
Constructor and Description |
---|
ReplicaCatalog()
The default constrcutor.
|
ReplicaCatalog(String url,
String type)
The overloaded constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
accept(SiteDataVisitor visitor)
Accept the visitor
|
void |
addAlias(String name)
Adds an alias site handle.
|
void |
addConnection(Connection connection)
Adds a connection parameter
|
void |
clearAliases()
Clears the aliases associates with the replica catalog.
|
Object |
clone()
Returns the clone of the object.
|
Iterator<String> |
getAliasIterator()
Returns an iterator to aliases associated with the site.
|
Iterator<Connection> |
getConnectionIterator()
Returns an iterator to connection params associated with the replica
catalog.
|
String |
getType()
Returns the type of replica catalog.
|
String |
getURL()
Returns the url for the replica catalog.
|
void |
initialize(String url,
String type)
Initialize the class.
|
void |
setType(String type)
Sets the type of replica catalog.
|
void |
setURL(String url)
Sets the url for the replica catalog.
|
void |
toXML(Writer writer,
String indent)
Writes out the xml description of the object.
|
protected void |
writeAlias(Writer writer,
String indent,
String value)
Renders alias as xml
|
toString, toXML, writeAttribute
protected String mURL
protected String mType
protected Collection<Connection> mConnectionParams
public void initialize(String url, String type)
url
- the url for the replica catalog.type
- the type of replica catalog.public void setURL(String url)
url
- the urlpublic String getURL()
public void setType(String type)
type
- the type of replica catalog.public String getType()
public void addAlias(String name)
name
- the site handle to alias to.public void addConnection(Connection connection)
connection
- the connection parameter.public void clearAliases()
public Iterator<String> getAliasIterator()
public Iterator<Connection> getConnectionIterator()
public void toXML(Writer writer, String indent) throws IOException
toXML
in class AbstractSiteData
writer
- is a Writer opened and ready for writing. This can also
be a StringWriter for efficient output.indent
- the indent to be used.IOException
- if something fishy happens to the stream.public Object clone()
clone
in class AbstractSiteData
protected void writeAlias(Writer writer, String indent, String value) throws IOException
writer
- is a Writer opened and ready for writing. This can also
be a StringWriter for efficient output.indent
- the indent to be used.value
- the value to use.IOException
- if something fishy happens to the stream.public void accept(SiteDataVisitor visitor) throws IOException
accept
in class AbstractSiteData
visitor
- IOException
- if something fishy happens to the stream.