public class SProxy extends TypedAtomicActor
Executes a proxy command. Currently supporteds command: 'list directory', 'copy', 'move', 'remove', 'replicate', 'create directory', 'remove directory', 'change mode'.
The actor accepts a reference to the SRB files system, and a desired command with its input ports. Outputs the command result along with an exit status.
COMMANDS DESCRIPTIONS:
List directory: Lists a remote directory content.
Inputs: path: [string]. Remote paths to list.
Output: listedFiles : [string]. Arrays of the contained files paths.
exitCode : string.
Option: outputEachFileSeparately. Whether to broadcast each file path sepearately or the whole list at once.
Copy/Move: Copys or moves files to a new path. Returns the new file paths. recursively copies/moves directories.
Inputs: path: [string]. Original remote file paths.
newPath: string. Location to copy/move.
Output: copiedFiles/movedFiles : [string]. Arrays of the new file paths.
Remove/Remove directory: Removes files/directories. Non-empty directories are recursively removed by remove r.
Inputs: path: [string]. Remote file paths.
Option: -r ; recursively removes files.
forward ; output an array of the removed files parent directory paths.
Create directory: Creates new directories. Returns the new directory path.
Inputs: path: [string]. New directories paths.
Output: dirPath: Created directories paths.
Replicate: Replicates a file/directory to a new resource.
Inputs: path: [string]. The files to be replicated.
newPath: [string]. The resource to replicate to.
Output: newResource: string. The files new resource.
Change mode: Changes the permissions of a file or a directory.
Inputs: path: [string]. Files paths.
permission: string
userName: string. To grant permission to.
mdasDomain: string. The metadata domain.
Output: exitPath: [string]. The files paths.
Entity.ContainedObjectsIterator
Modifier and Type | Field and Description |
---|---|
Parameter |
_r
Specify whether to remove recursively.
|
StringParameter |
command
The proxy command to be performed.
|
TypedIOPort |
exitCode
Execution exit code.
|
Parameter |
forwardParentDir
Specify whether to output the parent directories of removed
files/directories or have a sink actor.
|
Parameter |
hasTrigger
Specify whether to add a trigger port.
|
SingletonParameter |
hideMdasDomain |
SingletonParameter |
hideNewPath |
SingletonParameter |
hidePermission |
SingletonParameter |
hideTrigger |
SingletonParameter |
hideUserName |
TypedIOPort |
mdasDomain
Meta data domain.
|
TypedIOPort |
newPath
New file path.
|
Parameter |
outputEachFileSeparately
Specify whether to display the complete Sls result at once or each file
separately.
|
TypedIOPort |
path
Path to SRB file.
|
TypedIOPort |
permission
Files permissions.
|
TypedIOPort |
SRBFileSystem
SRB file system reference.
|
TypedIOPort |
trigger
An input trigger.
|
TypedIOPort |
userName
User name.
|
_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 |
---|
SProxy(CompositeEntity container,
java.lang.String name)
Construct a constant source with the given container and name.
|
Modifier and Type | Method and Description |
---|---|
void |
attributeChanged(Attribute at)
Callback for changes in attribute values.
|
void |
fire()
Upload the file to the SRB.
|
void |
initialize()
Initialize the srb file system to null.
|
void |
wrapup()
Disconnect from SRB.
|
_containedTypeConstraints, _customTypeConstraints, _defaultTypeConstraints, _fireAt, _fireAt, attributeTypeChanged, clone, clone, isBackwardTypeInferenceEnabled, newPort, typeConstraintList, typeConstraints
_actorFiring, _actorFiring, _declareDelayDependency, addActorFiringListener, addInitializable, connectionsChanged, createReceivers, declareDelayDependency, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, isFireFunctional, isStrict, iterate, newReceiver, outputPortList, postfire, prefire, preinitialize, pruneDependencies, recordFiring, removeActorFiringListener, removeDependency, removeInitializable, setContainer, stop, stopFire, terminate
_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, preinitialize, removeInitializable
description, getContainer, getDisplayName, getFullName, getName, getName, setName
getDerivedLevel, getDerivedList, propagateValue
public SingletonParameter hideTrigger
public SingletonParameter hideNewPath
public SingletonParameter hidePermission
public SingletonParameter hideUserName
public SingletonParameter hideMdasDomain
public TypedIOPort SRBFileSystem
public TypedIOPort path
public TypedIOPort newPath
public TypedIOPort permission
public TypedIOPort exitCode
public TypedIOPort userName
public TypedIOPort mdasDomain
public StringParameter command
public Parameter outputEachFileSeparately
public Parameter forwardParentDir
public TypedIOPort trigger
public Parameter hasTrigger
public SProxy(CompositeEntity container, java.lang.String name) throws NameDuplicationException, IllegalActionException
container
- The container.name
- The name of this actor.IllegalActionException
- If the entity cannot be contained by the proposed
container.NameDuplicationException
- If the container already has an actor with this name.public void attributeChanged(Attribute at) throws IllegalActionException
attributeChanged
in class NamedObj
a
- The attribute that changed.IllegalActionException
- If the offsets array is not nondecreasing and nonnegative.public void fire() throws IllegalActionException
fire
in interface Executable
fire
in class AtomicActor<TypedIOPort>
IllegalActionException
- If it is thrown if the SRB file cannot be accessed or the
current directory cannot be broadcasted.public void initialize() throws IllegalActionException
initialize
in interface Initializable
initialize
in class AtomicActor<TypedIOPort>
IllegalActionException
- If a derived class throws it.public void wrapup()
wrapup
in interface Initializable
wrapup
in class AtomicActor<TypedIOPort>