ist.palcom.communication.ast
Class ServiceProxy

java.lang.Object
  extended by ist.palcom.communication.ast.ASTNode
      extended by ist.palcom.communication.ast.ControlItem
          extended by ist.palcom.communication.ast.Group
              extended by ist.palcom.communication.ast.ServiceProxy
All Implemented Interfaces:
Cloneable

public class ServiceProxy
extends Group
implements Cloneable


Field Summary
static String CONTENT_TYPE
          MIME type for control data.
 
Fields inherited from class ist.palcom.communication.ast.ASTNode
CHANGE, children, generatedWithCacheCycle, generatedWithCircularEnabled, IN_CIRCLE, LAST_CYCLE, numChildren, parent
 
Constructor Summary
ServiceProxy()
           
ServiceProxy(GroupInfo p0, List p1)
           
ServiceProxy(String id)
           
 
Method Summary
 void addControlItem(ControlItem node)
           
 void addInCommandReceiver(PalcomThread receiver)
          Add a receiver for InCommands invoked on this ServiceProxy.
 void addOutCommandReceiver(PalcomThread receiver)
          Add a receiver for OutCommands received at this ServiceProxy.
 Object clone()
           
 ASTNode copy()
           
 void flushCache()
           
 ASTNode fullCopy()
           
 ControlItem getControlItem(int i)
           
 List getControlItemList()
           
 List getControlItemListNoTransform()
           
 URN getDeviceURN()
           
 GroupInfo getInfo()
           
 GroupInfo getInfoNoTransform()
           
 int getNumControlItem()
           
 URN getProviderURN()
           
 ServiceProxy getServiceProxy()
          Implements this method for a ServiceProxy, by returning itself.
 URN getURN()
           
 void invokeCommand(Command command)
          Invoke a command in this ServiceProxy.
 boolean isAboutTheSameEntityAs(Info info)
           
protected  int numChildren()
           
 void removeInCommandReceiver(PalcomThread receiver)
          Remove a receiver for InCommands.
 void removeOutCommandReceiver(PalcomThread receiver)
          Remove a receiver for OutCommands.
 void setControlItem(ControlItem node, int i)
           
 void setControlItemList(List list)
           
 void setInfo(GroupInfo node)
           
 void update(Command command)
          Update this ServiceProxy with the parameter values of a command, and invokes the command.
 
Methods inherited from class ist.palcom.communication.ast.Group
addControlItemAndInfo, findItem, findMatchingCommand, getHelp, getInfoAsInfo, setDataRefsAndAddDataToList, setDataAccordingToDataRefs, setHelp
 
Methods inherited from class ist.palcom.communication.ast.ControlItem
getID, getMessage, getTagName, initializeFromElement, writeStartTagAndAttributes, writeXMLElement
 
Methods inherited from class ist.palcom.communication.ast.ASTNode
addChild, getChild, getChildNoTransform, getIndexOfChild, getNumChild, getParent, insertChild, remove, removeChild, setChild, setParent
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, println, toString
 

Field Detail

CONTENT_TYPE

public static final String CONTENT_TYPE
MIME type for control data.

See Also:
Constant Field Values
Constructor Detail

ServiceProxy

public ServiceProxy()

ServiceProxy

public ServiceProxy(GroupInfo p0,
                    List p1)

ServiceProxy

public ServiceProxy(String id)
Method Detail

clone

public Object clone()
             throws CloneNotSupportedException
Overrides:
clone in class Group
Throws:
CloneNotSupportedException

copy

public ASTNode copy()
Overrides:
copy in class Group

fullCopy

public ASTNode fullCopy()
Overrides:
fullCopy in class Group

flushCache

public void flushCache()
Overrides:
flushCache in class Group

numChildren

protected int numChildren()
Overrides:
numChildren in class Group

setInfo

public void setInfo(GroupInfo node)
Overrides:
setInfo in class Group

getInfo

public GroupInfo getInfo()
Overrides:
getInfo in class Group

getInfoNoTransform

public GroupInfo getInfoNoTransform()
Overrides:
getInfoNoTransform in class Group

setControlItemList

public void setControlItemList(List list)
Overrides:
setControlItemList in class Group

getNumControlItem

public int getNumControlItem()
Overrides:
getNumControlItem in class Group

getControlItem

public ControlItem getControlItem(int i)
Overrides:
getControlItem in class Group

addControlItem

public void addControlItem(ControlItem node)
Overrides:
addControlItem in class Group

setControlItem

public void setControlItem(ControlItem node,
                           int i)
Overrides:
setControlItem in class Group

getControlItemList

public List getControlItemList()
Overrides:
getControlItemList in class Group

getControlItemListNoTransform

public List getControlItemListNoTransform()
Overrides:
getControlItemListNoTransform in class Group

isAboutTheSameEntityAs

public boolean isAboutTheSameEntityAs(Info info)
Overrides:
isAboutTheSameEntityAs in class Group

getURN

public URN getURN()

getDeviceURN

public URN getDeviceURN()

getProviderURN

public URN getProviderURN()

getServiceProxy

public ServiceProxy getServiceProxy()
Implements this method for a ServiceProxy, by returning itself.

Overrides:
getServiceProxy in class ControlItem

update

public void update(Command command)
Update this ServiceProxy with the parameter values of a command, and invokes the command. If there is a matching command in this ServiceProxy, the local command will be updated, and the local command (not the received command) will be sent to registered receivers, by a call to invokeCommand.


addInCommandReceiver

public void addInCommandReceiver(PalcomThread receiver)
Add a receiver for InCommands invoked on this ServiceProxy.


removeInCommandReceiver

public void removeInCommandReceiver(PalcomThread receiver)
Remove a receiver for InCommands.


addOutCommandReceiver

public void addOutCommandReceiver(PalcomThread receiver)
Add a receiver for OutCommands received at this ServiceProxy.


removeOutCommandReceiver

public void removeOutCommandReceiver(PalcomThread receiver)
Remove a receiver for OutCommands.


invokeCommand

public void invokeCommand(Command command)
Invoke a command in this ServiceProxy. The command will be sent to registered receivers, depending on the actual type of the command. If it is an InCommand, it will be sent to InCommand receivers. If it is an OutCommand, it will be sent to OutCommand receivers.