public class CAMERARESTService extends TypedAtomicActor
Entity.ContainedObjectsIterator
Modifier and Type | Field and Description |
---|---|
CompositeEntity |
con |
Parameter |
methodType
The REST service method to use, either GET or POST.
|
java.util.List |
oPortList
old port list.
|
TypedIOPort |
outputPort
Output of REST service.
|
StringParameter |
paramF
URL of the csdl file
|
PortParameter |
serviceSiteURL
The REST service URL.
|
static int |
TIMEOUT |
_typesValid
_actorFiringListeners, _initializables, _notifyingActorFiring, _stopRequested
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
COMPLETED, NOT_READY, STOP_ITERATING
Constructor and Description |
---|
CAMERARESTService(CompositeEntity container,
java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
void |
attributeChanged(Attribute at)
React to a change in an attribute.
|
boolean |
checkIfPortNameExists(java.lang.String value)
This method checks if the port with the provided name
exists or not.
|
void |
configureActorConstant(java.lang.String name,
java.lang.String value,
double[] pos)
Currently, this method is not used.
|
void |
configureActorParameter(java.lang.String value,
java.lang.String appender,
java.lang.String description,
java.lang.String valueType,
double[] pos)
This method creates Parameters with name as value and data type
it represents as valueType.
|
void |
configureActorPort(java.lang.String value,
java.lang.String description,
java.lang.String valueType)
It dynamically creates port with name as value and display
name as description and port type is set as valueType.
|
java.lang.String |
executeGetMethod(java.util.List<NameValuePair> nvPairList,
java.lang.String serSiteURL) |
java.lang.String |
executePostMethod(java.util.List<NameValuePair> pmPairList,
java.util.List<NameValuePair> flPairList,
java.lang.String serSiteURL)
File & regular parameters are passed as two separate lists and they are treated
little differently.
|
void |
fire()
Do nothing.
|
void |
remAttributes(java.lang.String resName)
Parameters whose names start with resName are removed by this method.
|
void |
removeMyPorts()
Removes port that were in the old list but not used currently
|
void |
removePorts()
This method removes all input ports
|
_containedTypeConstraints, _customTypeConstraints, _defaultTypeConstraints, _fireAt, _fireAt, attributeTypeChanged, clone, clone, isBackwardTypeInferenceEnabled, newPort, typeConstraintList, typeConstraints
_actorFiring, _actorFiring, _declareDelayDependency, addActorFiringListener, addInitializable, connectionsChanged, createReceivers, declareDelayDependency, getCausalityInterface, getDirector, getExecutiveDirector, getManager, initialize, inputPortList, isFireFunctional, isStrict, iterate, newReceiver, outputPortList, postfire, prefire, preinitialize, pruneDependencies, recordFiring, removeActorFiringListener, removeDependency, removeInitializable, setContainer, stop, stopFire, terminate, wrapup
_adjustDeferrals, _checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, isAtomic, isOpaque, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, propagateExistence, setName
_addPort, _description, _exportMoMLContents, _removePort, _validateSettables, connectedPortList, connectedPorts, containedObjectsIterator, getAttribute, getPort, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts, setClassDefinition, uniqueName
_setParent, exportMoML, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition, isWithinClassDefinition
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _executeChangeRequests, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, addHierarchyListener, attributeDeleted, attributeList, attributeList, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getFullName, getModelErrorHandler, getName, getName, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, validateSettables, workspace
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
createReceivers, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, newReceiver, outputPortList
isFireFunctional, isStrict, iterate, postfire, prefire, stop, stopFire, terminate
addInitializable, initialize, preinitialize, removeInitializable, wrapup
description, getContainer, getDisplayName, getFullName, getName, getName, setName
getDerivedLevel, getDerivedList, propagateValue
public StringParameter paramF
public PortParameter serviceSiteURL
public java.util.List oPortList
public Parameter methodType
public TypedIOPort outputPort
public static final int TIMEOUT
public CompositeEntity con
public CAMERARESTService(CompositeEntity container, java.lang.String name) throws NameDuplicationException, IllegalActionException
public void fire() throws IllegalActionException
AtomicActor
fire
in interface Executable
fire
in class AtomicActor<TypedIOPort>
IllegalActionException
- Not thrown in this base class.public void attributeChanged(Attribute at) throws IllegalActionException
NamedObj
attributeChanged
in class NamedObj
at
- The attribute that changed.IllegalActionException
- If the change is not acceptable
to this container (not thrown in this base class).public boolean checkIfPortNameExists(java.lang.String value)
value
- Port namepublic void removeMyPorts() throws NameDuplicationException, IllegalActionException
public void removePorts() throws NameDuplicationException, IllegalActionException
public void configureActorParameter(java.lang.String value, java.lang.String appender, java.lang.String description, java.lang.String valueType, double[] pos) throws IllegalActionException
value
- valueType
- pos
- IllegalActionException
NameDuplicationException
public void configureActorConstant(java.lang.String name, java.lang.String value, double[] pos) throws IllegalActionException, NameDuplicationException
name
- value
- pos
- IllegalActionException
NameDuplicationException
public void configureActorPort(java.lang.String value, java.lang.String description, java.lang.String valueType) throws IllegalActionException, NameDuplicationException
value
- description
- valueType
- IllegalActionException
NameDuplicationException
public void remAttributes(java.lang.String resName) throws IllegalActionException, NameDuplicationException
resName
- IllegalActionException
NameDuplicationException
public java.lang.String executePostMethod(java.util.List<NameValuePair> pmPairList, java.util.List<NameValuePair> flPairList, java.lang.String serSiteURL) throws IllegalActionException
pmPairList
- List of the name and value parameters that user has providedflPairList
- List of the name and value (full file path)of file parameters.
It is essentially a list of files that user wishes to attach.IllegalActionException
public java.lang.String executeGetMethod(java.util.List<NameValuePair> nvPairList, java.lang.String serSiteURL) throws IllegalActionException
pmPairList
- List of the name and value parameters that user has provided
through paramInputPort. However in method this list is combined with
the user configured ports and the combined list name value pair parameters are
added to the service URL separated by ampersand.nvPairList
- List of the name and value parameters that user has providedIllegalActionException