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, LINKSCOMPLETED, 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, workspaceequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcreateReceivers, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, newReceiver, outputPortListisFireFunctional, isStrict, iterate, postfire, prefire, stop, stopFire, terminateaddInitializable, initialize, preinitialize, removeInitializable, wrapupdescription, getContainer, getDisplayName, getFullName, getName, getName, setNamegetDerivedLevel, getDerivedList, propagateValuepublic 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
AtomicActorfire in interface Executablefire in class AtomicActor<TypedIOPort>IllegalActionException - Not thrown in this base class.public void attributeChanged(Attribute at) throws IllegalActionException
NamedObjattributeChanged in class NamedObjat - 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 - IllegalActionExceptionNameDuplicationExceptionpublic void configureActorConstant(java.lang.String name, java.lang.String value, double[] pos) throws IllegalActionException, NameDuplicationException
name - value - pos - IllegalActionExceptionNameDuplicationExceptionpublic void configureActorPort(java.lang.String value, java.lang.String description, java.lang.String valueType) throws IllegalActionException, NameDuplicationException
value - description - valueType - IllegalActionExceptionNameDuplicationExceptionpublic void remAttributes(java.lang.String resName) throws IllegalActionException, NameDuplicationException
resName - IllegalActionExceptionNameDuplicationExceptionpublic 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.IllegalActionExceptionpublic 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