|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectguarana.util.observer.smart.SmartObservable
guarana.framework.process.Process
public class Process
Processes serve two purposes, namely: there are processes that allow to wrap applications and processes that allow
to integrate them. The former are reusable processes that endow an application with a message-oriented API that
simplifies interacting with it. Implementing such a wrapping process may range from using a JDBC driver to interact
with a database to implementing a scrapper that emulates the behaviour of a person who interacts with a user
interface. Generally speaking, this is known as wrapping an application in the literature.
Integration processes, on the contrary, are intended to orchestrate the interactions with a number of wrapping
processes and other integration processes.
Processes rely on tasks to perform their wrapping or their orchestration activities. Simply put, a process
can be viewed as a message processor.
Graphical notation:
Constructor Summary | |
---|---|
Process(String name)
Constructs a new process with a given name. |
Method Summary | |
---|---|
Port |
addPort(Port port)
Adds a port to this process. |
Task |
addTask(Task task)
Adds a given task to this task container. |
boolean |
containsPort(String name)
Checks if this process contains a specific port. |
boolean |
containsTask(String name)
Searches for a given task name inside this task container. |
int |
countTask()
Counts the tasks inside this task container. |
Collection<Port> |
getAllPorts()
Returns all ports from this process. |
Collection<Task> |
getAllTasks()
Returns all tasks inside this task container. |
Map<String,EntryPort> |
getEntryPorts()
Returns all EntryPort s from the current process. |
Map<String,ExitPort> |
getExitPorts()
Returns all ExitPort s from the current process. |
String |
getName()
Returns the name of this source. |
Port |
getPort(String name)
Returns an specific port from this process. |
Map<String,ResponderPort> |
getResponderPorts()
Returns all ResponderPort s from the current process. |
Map<String,SolicitorPort> |
getSolicitorPorts()
Returns all solicitor ports from the current process. |
Task |
getTask(String name)
Searches for a task with a given name inside this task container. |
boolean |
hasEntryPort()
Checks if this process has any EntryPort . |
boolean |
hasExitPort()
Checks if this process has any ExitPort . |
boolean |
hasResponderPort()
Checks if this process has any ResponderPort . |
boolean |
hasSolicitorPort()
Checks if this process has any solicitor port. |
Port |
removePort(String name)
Removes a port from this process. |
Task |
removeTask(String name)
Removes a given task from this task container. |
void |
setName(String name)
Sets the name of this source. |
void |
update(guarana.util.observer.smart.SmartObservable obj,
Object task)
This method is automatically called by the observable task to notify the task is ready to be executed. |
Methods inherited from class guarana.util.observer.smart.SmartObservable |
---|
addSmartObserver, containsSmartObserver, containsSmartObserver, countSmartObservers, deleteSmartObserver, deleteSmartObservers, hasChanged, notifySmartObservers, notifySmartObservers |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Process(String name)
name
- The name of this process.Method Detail |
---|
public Port addPort(Port port) throws InvalidParameterException
port
- The port to be added.
InvalidParameterException
- if this method receives a null
port.public Port removePort(String name)
name
- The name of the port.
public boolean containsPort(String name)
name
- The name of the port.
public boolean hasEntryPort()
EntryPort
.
EntryPort
; otherwise, False.public boolean hasExitPort()
ExitPort
.
ExitPort
; otherwise, False.public boolean hasResponderPort()
ResponderPort
.
ResponderPort
; otherwise, False.public boolean hasSolicitorPort()
public void setName(String name)
setName
in interface ISource
setName
in interface guarana.util.observer.smart.ISmartObserver
name
- The name of this source.public String getName()
getName
in interface ISource
getName
in interface guarana.util.observer.smart.ISmartObserver
public Port getPort(String name)
name
- The name of the port.
null
if there is no port associated with the given name.public Map<String,EntryPort> getEntryPorts()
EntryPort
s from the current process.
Map
with all EntryPort
s or an empty map if none.public Map<String,ExitPort> getExitPorts()
ExitPort
s from the current process.
Map
with all ExitPort
s or an empty map if none.public Map<String,ResponderPort> getResponderPorts()
ResponderPort
s from the current process.
Map
with all ResponderPort
s or an empty map if none.public Map<String,SolicitorPort> getSolicitorPorts()
Map
with all solicitor ports or an empty map if none.public Collection<Port> getAllPorts()
public Task addTask(Task task) throws InvalidParameterException
addTask
in interface ITaskContainer
task
- The task to be added.
null
if there is no previous task.
InvalidParameterException
- if the task parameter is null
.public boolean containsTask(String name)
containsTask
in interface ITaskContainer
name
- The task name to be searched.
public int countTask()
countTask
in interface ITaskContainer
public Collection<Task> getAllTasks()
getAllTasks
in interface ITaskContainer
public Task getTask(String name)
getTask
in interface ITaskContainer
name
- The task name.
null
if none.public Task removeTask(String name)
removeTask
in interface ITaskContainer
name
- The name of the task to remove.
null
if there is no task associated with this name.public void update(guarana.util.observer.smart.SmartObservable obj, Object task) throws IllegalStateException
update
in interface guarana.util.observer.smart.ISmartObserver
obj
- THIS PARAMETHER IS NOT USED.task
- The observable task.
IllegalStateException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |