fi.hut.tml.xsmiles.mlfc.comm
Class COMMElementImpl
java.lang.Object
org.apache.xerces.dom.NodeImpl
org.apache.xerces.dom.ChildNode
org.apache.xerces.dom.ParentNode
org.apache.xerces.dom.ElementImpl
org.apache.xerces.dom.ElementNSImpl
fi.hut.tml.xsmiles.dom.XSmilesElementImpl
fi.hut.tml.xsmiles.mlfc.comm.COMMElementImpl
- All Implemented Interfaces:
- java.lang.Cloneable, DataListener, org.w3c.dom.Element, org.w3c.dom.events.EventTarget, InitializableElement, org.w3c.dom.Node, org.w3c.dom.NodeList, PseudoClassController, ResourceFetcher, java.io.Serializable, StylableElement, org.w3c.dom.TypeInfo
- public class COMMElementImpl
- extends XSmilesElementImpl
- implements DataListener
GPSData Element send dom changed events to inform
changes in coordinate data
- Author:
- Juha
- See Also:
- Serialized Form
| Fields inherited from class org.apache.xerces.dom.ElementNSImpl |
localName, namespaceURI |
| Fields inherited from class org.apache.xerces.dom.ElementImpl |
attributes, name |
| Fields inherited from class org.apache.xerces.dom.ParentNode |
firstChild, fNodeListCache, ownerDocument |
| Fields inherited from class org.apache.xerces.dom.ChildNode |
nextSibling, previousSibling |
| Fields inherited from class org.apache.xerces.dom.NodeImpl |
DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_IS_CONTAINED, DOCUMENT_POSITION_PRECEDING, ELEMENT_DEFINITION_NODE, FIRSTCHILD, flags, HASSTRING, ID, IGNORABLEWS, OWNED, ownerNode, READONLY, SPECIFIED, SYNCCHILDREN, SYNCDATA, TREE_POSITION_ANCESTOR, TREE_POSITION_DESCENDANT, TREE_POSITION_DISCONNECTED, TREE_POSITION_EQUIVALENT, TREE_POSITION_FOLLOWING, TREE_POSITION_PRECEDING, TREE_POSITION_SAME_NODE, UNNORMALIZED |
| Fields inherited from interface org.w3c.dom.Node |
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE |
|
Constructor Summary |
COMMElementImpl(org.apache.xerces.dom.DocumentImpl owner,
java.lang.String namespace,
java.lang.String tag,
COMMLFC m)
Constructor - Set the owner, name and namespace. |
|
Method Summary |
void |
dataReceived(java.lang.String source,
byte[] data,
java.lang.String mime)
Data has been received from COMM. |
void |
dataReceived(java.lang.String source,
java.lang.String data)
Data has been received from COMM. |
void |
destroy()
Do cleanup |
boolean |
getFile(java.net.URL location,
java.lang.String name)
|
java.lang.String |
getLocalPeerName()
Get local Peer name. |
java.lang.String |
getPeerGroupName()
Get PeerGroup name. |
java.lang.String |
getReceivedData()
|
java.lang.String |
getReceivedSender()
|
void |
init()
Initialize this element. |
boolean |
join(java.lang.String name,
java.lang.String params)
|
void |
leave(java.lang.String name)
|
boolean |
send(java.lang.String target,
java.lang.String data)
Send data to target |
boolean |
sendMime(java.lang.String target,
byte[] data,
java.lang.String mime)
|
boolean |
sendXML(java.lang.String target,
org.w3c.dom.Node node)
Send XML data to target |
| Methods inherited from class fi.hut.tml.xsmiles.dom.XSmilesElementImpl |
addBinding, addUndistributedChild, clone, clonePseudoElements, cloneSubtree, debugNode, debugNode, dispatchEventInMainThread, get, getApplyBindingSheets, getAuthorSheets, getChildNodes, getElementStatus, getId, getOriginalClone, getPseudoClass, getResourceReferencer, getRuleNode, getStyle, getStyleAttrValue, getText, getText, getUndistributedChildNodes, getXblImplementations, hasBinding, hasStyle, initFinalFlattenedTree, initStyle, isInitedForReset, isPseudoClass, removeBinding, removeUndistributedChild, replaceNode, resetFinalFlattenedTree, resolveURI, searchElementWithId, searchElementWithId, setApplyBindingSheets, setAuthorSheets, setPseudoClass, setRuleNode, setStyle, updateStyle |
| Methods inherited from class org.apache.xerces.dom.ElementNSImpl |
getBaseURI, getLocalName, getNamespaceURI, getPrefix, getTypeName, getTypeNamespace, setPrefix, setType, setValues |
| Methods inherited from class org.apache.xerces.dom.ElementImpl |
cloneNode, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getDefaultAttributes, getElementsByTagName, getElementsByTagNameNS, getNodeName, getNodeType, getSchemaTypeInfo, getTagName, getXercesAttribute, hasAttribute, hasAttributeNS, hasAttributes, isEqualNode, normalize, reconcileDefaultAttributes, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setReadOnly, setupDefaultAttributes, setXercesAttributeNode, synchronizeData |
| Methods inherited from class org.apache.xerces.dom.ParentNode |
getChildNodes, getChildNodesUnoptimized, getFirstChild, getLastChild, getLength, getOwnerDocument, getTextContent, hasChildNodes, insertBefore, item, removeChild, replaceChild, setTextContent, synchronizeChildren |
| Methods inherited from class org.apache.xerces.dom.ChildNode |
getNextSibling, getParentNode, getPreviousSibling |
| Methods inherited from class org.apache.xerces.dom.NodeImpl |
addEventListener, appendChild, changed, changes, compareDocumentPosition, compareTreePosition, dispatchEvent, getContainer, getFeature, getNodeNumber, getNodeValue, getReadOnly, getUserData, getUserData, isDefaultNamespace, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, needsSyncChildren, removeEventListener, setNodeValue, setUserData, setUserData, toString |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.w3c.dom.Element |
getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS |
| Methods inherited from interface org.w3c.dom.Node |
appendChild, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix |
COMMElementImpl
public COMMElementImpl(org.apache.xerces.dom.DocumentImpl owner,
java.lang.String namespace,
java.lang.String tag,
COMMLFC m)
- Constructor - Set the owner, name and namespace.
init
public void init()
- Initialize this element.
This requires that the DOM tree is available.
- Specified by:
init in interface InitializableElement- Overrides:
init in class XSmilesElementImpl
join
public boolean join(java.lang.String name,
java.lang.String params)
- Parameters:
params - The parameters that might be neededname - The group to join
@return true if successful
send
public boolean send(java.lang.String target,
java.lang.String data)
- Send data to target
- Returns:
- True if successful false if not
sendXML
public boolean sendXML(java.lang.String target,
org.w3c.dom.Node node)
- Send XML data to target
- Returns:
- True if successful false if not
sendMime
public boolean sendMime(java.lang.String target,
byte[] data,
java.lang.String mime)
getFile
public boolean getFile(java.net.URL location,
java.lang.String name)
- Parameters:
location - Where to save the filename - The filename to get
@return true if successful
dataReceived
public void dataReceived(java.lang.String source,
java.lang.String data)
- Data has been received from COMM. Dispatch an event.
- Specified by:
dataReceived in interface DataListener
- Parameters:
source - The sender of the datadata - The data sent
dataReceived
public void dataReceived(java.lang.String source,
byte[] data,
java.lang.String mime)
- Data has been received from COMM. Dispatch an event.
- Specified by:
dataReceived in interface DataListener
getReceivedData
public java.lang.String getReceivedData()
getReceivedSender
public java.lang.String getReceivedSender()
getLocalPeerName
public java.lang.String getLocalPeerName()
- Get local Peer name.
- Returns:
- Local peer name
getPeerGroupName
public java.lang.String getPeerGroupName()
- Get PeerGroup name.
- Returns:
- Local peer name
leave
public void leave(java.lang.String name)
- Parameters:
name - Leave a group
destroy
public void destroy()
- Do cleanup
- Overrides:
destroy in class XSmilesElementImpl
X-Smiles 1.2