public class DirectoryTable
extends com.streamscape.sef.dispatcher.AbstractDirectoryTable
Title: Service Event Fabric Core
Description: Defines a global Discovery configuration of the Fabric.
Copyright: Copyright (c) 2011
Company: StreamScape Technologies
Modifier and Type | Class and Description |
---|---|
static class |
DirectoryTable.Node |
Constructor and Description |
---|
DirectoryTable()
Constructs a new directory table.
|
Modifier and Type | Method and Description |
---|---|
void |
addLink(java.lang.String nodeName,
DiscoveryLink link)
Adds the specified link to the specified node.
|
void |
addLink(java.lang.String nodeName,
FabricNodeRole nodeRole,
DiscoveryLink link)
Adds the specified link to the specified node.
|
void |
addNode(java.lang.String name,
FabricNodeRole role)
Adds a new node with the specified name and role.
|
java.lang.String |
asJSON()
Returns the table serialized in JSON format.
|
java.lang.String |
asXML()
Returns the table serialized in XML format.
|
boolean |
equals(java.lang.Object other) |
boolean |
existsNode(java.lang.String name)
Checks if the specified node exists.
|
java.util.List |
getAllLinks()
Returns the set of links for all nodes.
|
java.util.List |
getAllNodes()
Returns all nodes.
|
java.util.List |
getLinks(java.lang.String nodeName)
Returns the list of links of the specified node.
|
DirectoryTable.Node |
getNode(java.lang.String name)
Returns the node with the specified name.
|
void |
removeLink(java.lang.String nodeName,
DiscoveryLink link)
Removes the specified link from the specified node.
|
void |
removeNode(java.lang.String name)
Removes the node with the specified name.
|
java.lang.String |
toString()
Returns the table serialized in XML format.
|
public void addLink(java.lang.String nodeName, DiscoveryLink link) throws DiscoveryModuleException
nodeName
- the name of the node to which the link will be added.link
- the link to be added.DiscoveryModuleException
- if the specified link is invalid.public void addLink(java.lang.String nodeName, FabricNodeRole nodeRole, DiscoveryLink link) throws DiscoveryModuleException
nodeName
- the name of the node.nodeRole
- the role of the node.link
- the link to be added.DiscoveryModuleException
- if the specified link is invalid.public void removeLink(java.lang.String nodeName, DiscoveryLink link) throws DiscoveryModuleException
nodeName
- the name of the node from which the link will be removed.link
- the link to be removed.DiscoveryModuleException
public java.util.List getLinks(java.lang.String nodeName)
nodeName
- the name of the node containing the list of necessary links.public java.util.List getAllLinks()
public java.util.List getAllNodes()
public void addNode(java.lang.String name, FabricNodeRole role) throws DiscoveryModuleException
name
- the name of the node to be added.role
- the role of the node to be added.DiscoveryModuleException
public void removeNode(java.lang.String name) throws DiscoveryModuleException
name
- the name of the node to be removed.DiscoveryModuleException
public DirectoryTable.Node getNode(java.lang.String name)
name
- the name of the node to be returned.null
if the node is not found.public boolean existsNode(java.lang.String name)
name
- the specified node name.true
if the specified node exists, false
otherwise.public java.lang.String asXML() throws java.lang.Exception
java.lang.Exception
- if some error occurs.public java.lang.String asJSON() throws java.lang.Exception
java.lang.Exception
- if some error occurs.public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2015-2024 StreamScape Technologies. All rights reserved.