ist.palcom.resource.descriptor
Class ServiceProxy

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

public class ServiceProxy
extends Group
implements java.lang.Cloneable


Field Summary
static java.lang.String CONTENT_TYPE
          MIME type for control data.
protected  boolean getBrowserLabel_visited
           
 
Fields inherited from class ist.palcom.resource.descriptor.ASTNode
CHANGE, children, encloseInBraces_visited, generatedWithCacheCycle, generatedWithCircularEnabled, generatedWithComponentCheck, getAssemblyLabel_visited, getErrorList_visited, getIndent_visited, getParentPRDAssemblyVer_visited, getPrettyClosingString_visited, getPrettyString_visited, IN_CIRCLE, LAST_CYCLE, numChildren, parent, prettyPrintChildren_visited, RESET_CYCLE
 
Constructor Summary
ServiceProxy()
           
ServiceProxy(GroupInfo p0, List p1)
           
ServiceProxy(java.lang.String id)
           
 
Method Summary
 void addControlItem(ControlItem node)
           
 void addControlItemAndInfo(ControlItem item)
           
 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.
 java.lang.Object clone()
           
 ASTNode copy()
           
 ControlItem findItem(java.lang.String id)
          Returns the ControlItem within the sub-tree rooted at this ControlItem that has the sought ID, or null if none exists.
 Command findMatchingCommand(Command command)
          Implements this method for groups (overrides the method in ControlItem).
 void flushCache()
           
 ASTNode fullCopy()
           
 AbstractResourceAddress getAddress()
           
 java.lang.String getBrowserLabel()
           
 ControlItem getControlItem(int i)
           
 List getControlItemList()
           
 List getControlItemListNoTransform()
           
 DeviceID getDeviceID()
           
 GroupInfo getInfo()
           
 PRDData getInfoAsInfo()
          Workaround for static typing.
 GroupInfo getInfoNoTransform()
           
 LocalSID getLocalSID()
           
 int getNumControlItem()
           
 ControlService getParentService()
           
 ServiceProxy getServiceProxy()
          Implements this method for a ServiceProxy, by returning itself.
 void invokeCommand(Command command, java.util.ArrayList addresses)
          Invoke a command in this ServiceProxy.
 boolean isAboutTheSameEntityAs(PRDData data)
           
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 setDataRefsAndAddDataToList(java.util.ArrayList dataList)
           
 void setDataAccordingToDataRefs(byte[][] data)
           
 void setHelp(java.lang.String help)
           
 void setInfo(GroupInfo node)
           
 void update(Command command, java.util.ArrayList addresses)
          Update this ServiceProxy with the parameter values of a command, and invokes the command.
 
Methods inherited from class ist.palcom.resource.descriptor.Group
findCommand, getChildArray, getHelp
 
Methods inherited from class ist.palcom.resource.descriptor.ControlItem
getID, getMessage, getTagName, initializeFromElement, writeStartTagAndAttributes, writeXMLElement
 
Methods inherited from class ist.palcom.resource.descriptor.ASTNode
addASTtoList, addChild, Define_AbstractResourceAddress_custServiceAddress, Define_AbstractResourceAddress_provServiceAddress, Define_CommandInfo_ci, Define_Device_parentDevice, Define_Identifier_getLocalName, Define_NetworkNode_lookup, Define_PRDAssemblyVer_av, Define_Service_inhCust, Define_Service_inhProv, Define_Service_parentService, Define_String_expectedType, Define_Universe_universe, encloseInBraces, getAssemblyLabel, getChild, getChildNoTransform, getErrorList, getIDforEditing, getIndent, getIndexOfChild, getNumChild, getParent, getParentPRDAssemblyVer, getPrettyClosingString, getPrettyString, insertChild, prettyprint, prettyPrintChildren, remove, removeChild, reset, resetTree, setChild, setParent, updateIDfromEditor
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONTENT_TYPE

public static final java.lang.String CONTENT_TYPE
MIME type for control data.

See Also:
Constant Field Values

getBrowserLabel_visited

protected boolean getBrowserLabel_visited
Constructor Detail

ServiceProxy

public ServiceProxy(java.lang.String id)

ServiceProxy

public ServiceProxy()

ServiceProxy

public ServiceProxy(GroupInfo p0,
                    List p1)
Method Detail

flushCache

public void flushCache()
Overrides:
flushCache in class Group

clone

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

copy

public ASTNode copy()
Overrides:
copy in class Group

fullCopy

public ASTNode fullCopy()
Overrides:
fullCopy in class Group

getParentService

public ControlService getParentService()

getAddress

public AbstractResourceAddress getAddress()

getLocalSID

public LocalSID getLocalSID()

getDeviceID

public DeviceID getDeviceID()

getInfoAsInfo

public PRDData getInfoAsInfo()
Description copied from class: ControlItem
Workaround for static typing.

Overrides:
getInfoAsInfo in class Group

setHelp

public void setHelp(java.lang.String help)
Overrides:
setHelp in class Group

findItem

public ControlItem findItem(java.lang.String id)
Description copied from class: ControlItem
Returns the ControlItem within the sub-tree rooted at this ControlItem that has the sought ID, or null if none exists. This method is overridden in appropriate subclasses.

Overrides:
findItem in class Group

getServiceProxy

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

Overrides:
getServiceProxy in class ControlItem

findMatchingCommand

public Command findMatchingCommand(Command command)
Implements this method for groups (overrides the method in ControlItem). Searches the subtree for matches.

Overrides:
findMatchingCommand in class Group

setDataRefsAndAddDataToList

public void setDataRefsAndAddDataToList(java.util.ArrayList dataList)
Overrides:
setDataRefsAndAddDataToList in class Group

setDataAccordingToDataRefs

public void setDataAccordingToDataRefs(byte[][] data)
Overrides:
setDataAccordingToDataRefs in class Group

update

public void update(Command command,
                   java.util.ArrayList addresses)
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,
                          java.util.ArrayList addresses)
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.


addControlItemAndInfo

public void addControlItemAndInfo(ControlItem item)
Overrides:
addControlItemAndInfo in class Group

isAboutTheSameEntityAs

public boolean isAboutTheSameEntityAs(PRDData data)
Overrides:
isAboutTheSameEntityAs 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

getBrowserLabel

public java.lang.String getBrowserLabel()
Overrides:
getBrowserLabel in class Group