java.apps
Class LocalUSP

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Panel
                    |
                    +--java.applet.Applet
                          |
                          +--java.apps.LocalUSP

public class LocalUSP
extends java.applet.Applet

An applet is a small program that is intended not to be run on its own, but rather to be embedded inside another application. The Applet class must be the superclass of any applet that is embedded in a Web page or viewed by the Java Applet Viewer. The Applet class provides a standard interface between applets and their environment.

See Also:
Serialized Form

Field Summary
 boolean appletcontext
           
 boolean ask_role
           
 boolean disconnected
           
 boolean exit
           
 java.lang.String filename
           
 java.net.URL home
           
 java.lang.String homehost
           
 java.net.URL htmlurl
           
 boolean multiparty
           
 java.lang.String myhost
           
 java.lang.String myuspname
           
 boolean organized
           
 java.lang.String otherroleinservice
           
 java.lang.String party
           
 java.lang.String role
           
 boolean role_not_set
           
 int service_number
           
 java.apps.ServiceIdent serviceident
           
 java.lang.String servicename
           
 java.net.URL urlfile
           
 java.net.URL urlusp
           
 java.lang.String user
           
 java.lang.String uspident
           
 java.lang.String uspname
           
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Constructor Summary
LocalUSP()
           
 
Method Summary
 java.lang.Integer activateAP(java.lang.String htmlfile, java.lang.String uspsource, java.lang.String party, java.lang.String role)
           
 int activateService()
          Method that actives the service throw the MultiTEL local kernel.
 boolean actualizeAPD(int index, java.lang.String name, java.lang.String description, java.lang.String miscellany, int state, java.net.URL url, java.lang.String advancedInfo, boolean organized, java.lang.String file, java.lang.String uspsrc)
           
 void addDevConnectionsInfo(java.apps.ServiceIdent ident, java.lang.String uspname, java.util.Hashtable devcon)
           
 void addRefTo(java.lang.String name, Component c)
           
 void addRefTo(java.lang.String name, Component c, java.lang.String role)
           
 void addRefTo(java.lang.String name, Connector c)
           
 void addRefTo(java.lang.String name, Connector c, java.lang.String role)
           
 int addToContext(Component c)
           
 int addToContext(Connector c)
           
 void addUSPToKernel(java.apps.ServiceIdent ident, java.lang.String uspname)
          Methods to set and link the active service (its USP) to the local Kernel, including the information related to set connections and information structures about the running service.
 int alterContext(Component c)
           
 int alterContext(Connector c)
           
 void alterContext(Connector[] cc, Component[] c)
          This method modifies the local context.
 void broadcast(java.apps.Message m)
          Method that performs the mechanism of broadcasting a message to all suitable components
 void broadcasting(java.apps.Message m)
           
 java.util.Vector captureDevices(java.util.Vector devices)
          Methods to invoke services offered by the Device Manager, to capture devices and release them.
 void component(java.lang.String name, java.lang.String role, java.lang.String location, java.lang.String implementation)
          Methods that define all the components and connectors that can be instanciated anytime along service lifetime.
 void connecToBy(java.lang.String connector, java.lang.String component, java.lang.String event)
          Method that connects a connector to a component, because that connector will handle the event propagated by this component
 void connector(java.lang.String name, java.lang.String role, java.lang.String location, java.lang.String implementation)
           
 void connectToBy(java.lang.String connector, java.lang.String component, java.lang.String event, java.lang.String rename)
          This method is the same as above, except that it renames the event before it was propagated to the connector
 void consultRole()
           
 Component createComponent(java.lang.String name)
           
 Component createComponent(java.lang.String name, java.lang.Object[] args)
          Methods to create and destroy components (and device components), as well as connectors by reflection (reflective programming)
 Connector createConnector(java.lang.String name)
           
 Connector createConnector(java.lang.String name, java.lang.Object[] args)
           
 Component createDevComponent(java.lang.String devImpl, java.lang.String devInterface)
           
 Component createDevComponent(java.lang.String devImpl, java.lang.String devInterface, java.lang.Object[] args)
           
 java.lang.Object createInstance(java.lang.String impl, java.lang.Object[] args)
           
 java.lang.Object createInstance(java.lang.String impl, java.lang.String name)
           
 void defComponents()
           
 void defConnectors()
           
 void desactivateService()
          Method that desactives the service throw the MultiTEL local kernel.
 void destroy()
           
 void deviceReleased(java.lang.String device)
           
 void disconnect()
          Methods that perform the correct disconnection of the service
 void event(java.apps.ClassEvent event)
          This method decides, at runtime, about which connector or connectors may handle an event.
 void finalizeComponent(Component c)
           
 void finalizeConnector(Connector c)
           
 Component getComponentFromContext(java.lang.String name)
           
 Component getComponentFromContext(java.lang.String name, int ident)
           
 Component getComponentFromContext(java.net.URL url)
           
 Connector getConnectorFromContext(java.lang.String name)
           
 Connector getConnectorFromContext(java.net.URL url)
           
 void getFile()
          Method that obtains the filename of the organization file.
 java.util.Vector getGlobalContext()
          These methods return a list with all the USP connected to the current service (global application context), representing all the users (participants and manager(s)).
 void getHome()
          Method that do not need to be overridden .
 java.util.Vector getLocalAPD(java.lang.String pattern)
          Methods that invoke services offered by the local application directory like, for example, search a specific remote directory, update an entry, or register a new service (adding an entry).
 java.util.Vector getLocalC3D(java.lang.String pattern)
           
 java.util.Vector getLocalUSPsInService(java.apps.ServiceIdent s)
           
 java.lang.String getOrgFile(int index)
           
 java.lang.String getOrgFile(java.lang.String htmlfile, java.lang.String uspsource)
           
 java.apps.APD getRemoteAPD(java.lang.String host)
          Method that obtains remote references of remote objects that belongs to a remote MultiTEL kernel
 java.apps.USP getRemoteUSP(java.lang.String hostandname)
           
 java.apps.USP getRemoteUSP(java.lang.String host, java.lang.String servername)
           
 void getRole()
          This method can be overridden .
 void getRoleByGui()
           
 void getRoleByParam()
           
 void getServiceName()
          This method can be overridden .
 void getServiceNumber()
          This method do not need to be be overridden .
 java.lang.String getServiceParameter(java.lang.String name)
           
 java.apps.UserServiceInfo getUserServiceInfo(java.apps.ServiceIdent s, java.lang.String usp)
           
 java.lang.String getUSPByUser(java.lang.String user)
          Useful methods for components and connectors.
 void getUSPIdent()
          Method that creates remote USP ident.
 java.lang.Integer getUSPIdent(int index)
           
 java.util.Vector getUSPsInService(java.apps.ServiceIdent s)
           
 void handlesEventFrom(java.lang.String connector, java.lang.String event, java.lang.String[] components)
          This method is similar to the above one, but it do not renames the event.
 void handlesEventFrom(java.lang.String connector, java.lang.String event, java.lang.String[] components, java.lang.String rename)
          Method that connects a connector to a set of components, because that connector will handle an event propagated by these components.
 void handlesEventsFrom(java.lang.String connector, java.lang.String[] events, java.lang.String component)
          Method that connects a connector to a component, because that connector will handle the events propagated by this component
 void init()
          Redefinition of the Applet class method init.
 void initialContext()
          Method that instanciates the initial context service, depending on user role
 boolean isHereTheComponent(java.lang.String name, int ident)
           
 boolean isOrganized()
          Methods to load the service organization file, if it has been organised.
 boolean isThisComponentHere(java.lang.String name)
           
 boolean isThisComponentHere(java.lang.String name, java.lang.String role)
           
 boolean isThisConnectorHere(java.lang.String name)
           
 boolean isThisConnectorHere(java.lang.String name, java.lang.String role)
           
 void loadConnections()
          These methods define the service architecture.
 void loadOrganization()
           
 void loadOrganizationImplementations()
           
 void loadOrganizationLocations()
           
 void loadOrganizationParameters()
           
 void loadOrganizationParty()
           
 java.lang.String localizeComponentByType(java.lang.String type)
          Methods that manage the local context of instanciated components and connectors.
 Component lookfor(java.lang.String name)
           
 void managerInitialContext()
          Method that instanciates the initial context service for a manager (first method), or a participant (the second one).
 void migrate(Connector c, java.lang.String destination)
          Method that migrates an instanciated connector to another active service USP
 void migration(Connector c)
          This method accepts a migrated connector to be installed at this USP
 java.io.InputStreamReader openRemoteFile(java.lang.String filename)
           
 void participantInitialContext()
           
 void propagateEvent(java.lang.String connectorname, java.apps.ClassEvent e)
          Method that propagates the event to the connector that will handle it at the local context.
 void receiveMessage(java.apps.Message m)
          Method that invokes a message of a component inside the local context ( instanciated components)
 void registerAP(java.lang.String name, java.lang.String description, java.lang.String miscellany, int state, java.net.URL url, java.lang.String advancedInfo, boolean organized, java.lang.String file, java.lang.String uspsrc)
           
 void releaseDevComponent(java.util.Vector devices)
           
 void releaseDevices()
           
 void removeAP(int index)
           
 void removeComponentRef(java.lang.String name)
           
 void removeComponentRef(java.lang.String name, java.lang.String role)
           
 void removeConnectorRef(java.lang.String name)
           
 void removeConnectorRef(java.lang.String name, java.lang.String role)
           
 void removeUSPFromKernel(java.apps.ServiceIdent ident, java.lang.String uspname)
           
 java.util.Vector searchAP(java.lang.String pattern, java.lang.String where, java.lang.String scope)
           
 java.util.Vector searchC3(java.lang.String pattern, java.lang.String where, java.lang.String scope)
          Methods to manage the repository directory, containing components, connectors and services.
 void sendMessage(java.apps.Message m)
          Name-based invocation Methods that handle the three types of message delivery from connectors to components.
 void sendMessageByType(java.apps.Message m)
          Class-based invocation Methods that handle the three types of message delivery from connectors to components.
 void setOrganization()
          Method that loads the organization file (written in LCF language), and loads the necessary parameters' values to run the service
 void setServiceOptions()
          Method that must be overridden to set service options that can not be set at the configuration phase of a service
 void setValueParameter(java.lang.String name, java.lang.String value)
           
 void transmitEvent(java.lang.String uspremote, java.lang.String name, java.apps.ClassEvent e)
           
 void transmitEvent(java.apps.USP uspremote, java.lang.String name, java.apps.ClassEvent e)
          Method that propagates the event to a remote USP, that will be managed by remote connectors.
 void transmitEventToHost(java.lang.String host, java.lang.String to, java.apps.ClassEvent e)
           
 java.lang.String typeOf(java.lang.String name)
           
 java.lang.String valueOf(java.lang.String name)
           
 java.lang.String whoNeedIt(java.lang.String name)
           
 
Methods inherited from class java.applet.Applet
getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus, start, stop
 
Methods inherited from class java.awt.Panel
addNotify
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, remove, remove, removeAll, removeContainerListener, removeNotify, setFont, setLayout, update, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, disable, dispatchEvent, enable, enable, enableInputMethods, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

role

public java.lang.String role

organized

public boolean organized

multiparty

public boolean multiparty

appletcontext

public boolean appletcontext

disconnected

public boolean disconnected

party

public java.lang.String party

ask_role

public boolean ask_role

service_number

public int service_number

home

public java.net.URL home

urlusp

public java.net.URL urlusp

urlfile

public java.net.URL urlfile

htmlurl

public java.net.URL htmlurl

uspident

public java.lang.String uspident

homehost

public java.lang.String homehost

otherroleinservice

public java.lang.String otherroleinservice

uspname

public java.lang.String uspname

myuspname

public java.lang.String myuspname

myhost

public java.lang.String myhost

filename

public java.lang.String filename

user

public java.lang.String user

servicename

public java.lang.String servicename

serviceident

public java.apps.ServiceIdent serviceident

role_not_set

public boolean role_not_set

exit

public boolean exit
Constructor Detail

LocalUSP

public LocalUSP()
Method Detail

init

public void init()
Redefinition of the Applet class method init. Called by the browser or applet viewer to inform this applet that it has been loaded into the system. In this method, the local USP of a service initalizes the connection with the MultiTEL middleware components, the service architecture (components, connectors and links) and the initial context to start the running.
Overrides:
init in class java.applet.Applet

setServiceOptions

public void setServiceOptions()
Method that must be overridden to set service options that can not be set at the configuration phase of a service

getHome

public void getHome()
             throws java.lang.Exception
Method that do not need to be overridden . Sets the home service using the HTML file that constains the applet and the context of the browser.

getServiceNumber

public void getServiceNumber()
This method do not need to be be overridden . Sets the instance service number to distinguish between different running instances of the same service.

getServiceName

public void getServiceName()
This method can be overridden . Sets the service name. This string is part of the USP ident

getRole

public void getRole()
This method can be overridden . Sets the user role in the running service. First, it consults the applet parameters contained in the HTML file (parameter role). If it that not exist, asks for it to the user by a Graphical User Interface

consultRole

public void consultRole()

getRoleByGui

public void getRoleByGui()

getRoleByParam

public void getRoleByParam()

activateService

public int activateService()
Method that actives the service throw the MultiTEL local kernel. It returns the service number assigned by the Application Directory

desactivateService

public void desactivateService()
Method that desactives the service throw the MultiTEL local kernel. It must be invoked only once by the last user (usually the manager). It remove the application directory entry and the file used by users to join to the active service

getUSPIdent

public void getUSPIdent()
Method that creates remote USP ident.

isOrganized

public boolean isOrganized()
Methods to load the service organization file, if it has been organised.

loadOrganization

public void loadOrganization()

loadOrganizationParameters

public void loadOrganizationParameters()

loadOrganizationImplementations

public void loadOrganizationImplementations()

loadOrganizationParty

public void loadOrganizationParty()

loadOrganizationLocations

public void loadOrganizationLocations()

getFile

public void getFile()
Method that obtains the filename of the organization file. First, it consults the parameters defined inside the HTML file of the application directory entry.

setOrganization

public void setOrganization()
Method that loads the organization file (written in LCF language), and loads the necessary parameters' values to run the service

getRemoteAPD

public java.apps.APD getRemoteAPD(java.lang.String host)
Method that obtains remote references of remote objects that belongs to a remote MultiTEL kernel

getLocalAPD

public java.util.Vector getLocalAPD(java.lang.String pattern)
                             throws java.rmi.RemoteException
Methods that invoke services offered by the local application directory like, for example, search a specific remote directory, update an entry, or register a new service (adding an entry).

searchAP

public java.util.Vector searchAP(java.lang.String pattern,
                                 java.lang.String where,
                                 java.lang.String scope)
                          throws java.rmi.RemoteException

actualizeAPD

public boolean actualizeAPD(int index,
                            java.lang.String name,
                            java.lang.String description,
                            java.lang.String miscellany,
                            int state,
                            java.net.URL url,
                            java.lang.String advancedInfo,
                            boolean organized,
                            java.lang.String file,
                            java.lang.String uspsrc)
                     throws java.rmi.RemoteException

registerAP

public void registerAP(java.lang.String name,
                       java.lang.String description,
                       java.lang.String miscellany,
                       int state,
                       java.net.URL url,
                       java.lang.String advancedInfo,
                       boolean organized,
                       java.lang.String file,
                       java.lang.String uspsrc)
                throws java.rmi.RemoteException

activateAP

public java.lang.Integer activateAP(java.lang.String htmlfile,
                                    java.lang.String uspsource,
                                    java.lang.String party,
                                    java.lang.String role)
                             throws java.rmi.RemoteException

removeAP

public void removeAP(int index)
              throws java.rmi.RemoteException

getUSPIdent

public java.lang.Integer getUSPIdent(int index)
                              throws java.rmi.RemoteException

getOrgFile

public java.lang.String getOrgFile(java.lang.String htmlfile,
                                   java.lang.String uspsource)
                            throws java.rmi.RemoteException

getOrgFile

public java.lang.String getOrgFile(int index)
                            throws java.rmi.RemoteException

searchC3

public java.util.Vector searchC3(java.lang.String pattern,
                                 java.lang.String where,
                                 java.lang.String scope)
                          throws java.rmi.RemoteException
Methods to manage the repository directory, containing components, connectors and services.

getLocalC3D

public java.util.Vector getLocalC3D(java.lang.String pattern)
                             throws java.rmi.RemoteException

addUSPToKernel

public void addUSPToKernel(java.apps.ServiceIdent ident,
                           java.lang.String uspname)
                    throws java.rmi.RemoteException
Methods to set and link the active service (its USP) to the local Kernel, including the information related to set connections and information structures about the running service.

getLocalUSPsInService

public java.util.Vector getLocalUSPsInService(java.apps.ServiceIdent s)
                                       throws java.rmi.RemoteException

getUSPsInService

public java.util.Vector getUSPsInService(java.apps.ServiceIdent s)
                                  throws java.rmi.RemoteException

getUserServiceInfo

public java.apps.UserServiceInfo getUserServiceInfo(java.apps.ServiceIdent s,
                                                    java.lang.String usp)
                                             throws java.lang.Exception,
                                                    java.rmi.RemoteException

removeUSPFromKernel

public void removeUSPFromKernel(java.apps.ServiceIdent ident,
                                java.lang.String uspname)
                         throws java.rmi.RemoteException

addDevConnectionsInfo

public void addDevConnectionsInfo(java.apps.ServiceIdent ident,
                                  java.lang.String uspname,
                                  java.util.Hashtable devcon)
                           throws java.lang.Exception,
                                  java.rmi.RemoteException

captureDevices

public java.util.Vector captureDevices(java.util.Vector devices)
                                throws java.rmi.RemoteException
Methods to invoke services offered by the Device Manager, to capture devices and release them.

releaseDevices

public void releaseDevices()
                    throws java.rmi.RemoteException

deviceReleased

public void deviceReleased(java.lang.String device)
                    throws java.rmi.RemoteException

event

public void event(java.apps.ClassEvent event)
This method decides, at runtime, about which connector or connectors may handle an event. So, the decision is taken outside of components and it is made at runtime. It is a binding method that matches the component's event with the list of connectors' events. It looks up in the structure that maintain the list of bound connectors (the application context) looking for the connectors that are supposed to handle the propagated event according to the architecture of the application. This method is applied each time a component propagates an event.

transmitEvent

public void transmitEvent(java.apps.USP uspremote,
                          java.lang.String name,
                          java.apps.ClassEvent e)
                   throws java.lang.Exception
Method that propagates the event to a remote USP, that will be managed by remote connectors.

transmitEvent

public void transmitEvent(java.lang.String uspremote,
                          java.lang.String name,
                          java.apps.ClassEvent e)
                   throws java.lang.Exception

transmitEventToHost

public void transmitEventToHost(java.lang.String host,
                                java.lang.String to,
                                java.apps.ClassEvent e)
                         throws java.lang.Exception

propagateEvent

public void propagateEvent(java.lang.String connectorname,
                           java.apps.ClassEvent e)
Method that propagates the event to the connector that will handle it at the local context. The USP calls the catchEvent() method of the target connector.

alterContext

public void alterContext(Connector[] cc,
                         Component[] c)
This method modifies the local context. It adds instanciated components and connectors to the active service.

alterContext

public int alterContext(Component c)

alterContext

public int alterContext(Connector c)

broadcast

public void broadcast(java.apps.Message m)
Method that performs the mechanism of broadcasting a message to all suitable components

broadcasting

public void broadcasting(java.apps.Message m)

sendMessage

public void sendMessage(java.apps.Message m)
                 throws java.lang.Exception
Name-based invocation Methods that handle the three types of message delivery from connectors to components.

sendMessageByType

public void sendMessageByType(java.apps.Message m)
                       throws java.lang.Exception
Class-based invocation Methods that handle the three types of message delivery from connectors to components.

receiveMessage

public void receiveMessage(java.apps.Message m)
Method that invokes a message of a component inside the local context ( instanciated components)

localizeComponentByType

public java.lang.String localizeComponentByType(java.lang.String type)
Methods that manage the local context of instanciated components and connectors.

addToContext

public int addToContext(Component c)

addToContext

public int addToContext(Connector c)

finalizeConnector

public void finalizeConnector(Connector c)

finalizeComponent

public void finalizeComponent(Component c)

getComponentFromContext

public Component getComponentFromContext(java.lang.String name,
                                         int ident)

getComponentFromContext

public Component getComponentFromContext(java.net.URL url)

getComponentFromContext

public Component getComponentFromContext(java.lang.String name)

getConnectorFromContext

public Connector getConnectorFromContext(java.net.URL url)

getConnectorFromContext

public Connector getConnectorFromContext(java.lang.String name)

getRemoteUSP

public java.apps.USP getRemoteUSP(java.lang.String host,
                                  java.lang.String servername)
                           throws java.lang.Exception

getRemoteUSP

public java.apps.USP getRemoteUSP(java.lang.String hostandname)
                           throws java.lang.Exception

lookfor

public Component lookfor(java.lang.String name)

disconnect

public void disconnect()
                throws java.lang.Exception
Methods that perform the correct disconnection of the service

destroy

public void destroy()
Overrides:
destroy in class java.applet.Applet

getGlobalContext

public java.util.Vector getGlobalContext()
These methods return a list with all the USP connected to the current service (global application context), representing all the users (participants and manager(s)).

loadConnections

public void loadConnections()
These methods define the service architecture. They must be overridden for every service to define its service architecture (components, connectors and conexions between them) and the initial context of an active service. The body of the loadConnections is made off invoking the methods handlesEventFrom(), handlesEventsFrom(), connectToBy(). The body of the loadComponent is made off invoking the method Component(), for every component that can be instanciated during service lifetime . The body of the loadConnector is made off invoking the method Connector(), for every connector that can be instanciated during service lifetime .

defComponents

public void defComponents()

defConnectors

public void defConnectors()

initialContext

public void initialContext()
Method that instanciates the initial context service, depending on user role

managerInitialContext

public void managerInitialContext()
Method that instanciates the initial context service for a manager (first method), or a participant (the second one). These methods must be overridden for every service. The body must contains calls to the methods createComponent(), createConnector(), or alterContext().

participantInitialContext

public void participantInitialContext()

getServiceParameter

public java.lang.String getServiceParameter(java.lang.String name)

valueOf

public java.lang.String valueOf(java.lang.String name)

typeOf

public java.lang.String typeOf(java.lang.String name)

whoNeedIt

public java.lang.String whoNeedIt(java.lang.String name)

setValueParameter

public void setValueParameter(java.lang.String name,
                              java.lang.String value)

component

public void component(java.lang.String name,
                      java.lang.String role,
                      java.lang.String location,
                      java.lang.String implementation)
Methods that define all the components and connectors that can be instanciated anytime along service lifetime.

connector

public void connector(java.lang.String name,
                      java.lang.String role,
                      java.lang.String location,
                      java.lang.String implementation)

handlesEventFrom

public void handlesEventFrom(java.lang.String connector,
                             java.lang.String event,
                             java.lang.String[] components,
                             java.lang.String rename)
Method that connects a connector to a set of components, because that connector will handle an event propagated by these components. It renames the event before resending it.

handlesEventFrom

public void handlesEventFrom(java.lang.String connector,
                             java.lang.String event,
                             java.lang.String[] components)
This method is similar to the above one, but it do not renames the event.

connecToBy

public void connecToBy(java.lang.String connector,
                       java.lang.String component,
                       java.lang.String event)
Method that connects a connector to a component, because that connector will handle the event propagated by this component

connectToBy

public void connectToBy(java.lang.String connector,
                        java.lang.String component,
                        java.lang.String event,
                        java.lang.String rename)
This method is the same as above, except that it renames the event before it was propagated to the connector

handlesEventsFrom

public void handlesEventsFrom(java.lang.String connector,
                              java.lang.String[] events,
                              java.lang.String component)
Method that connects a connector to a component, because that connector will handle the events propagated by this component

migrate

public void migrate(Connector c,
                    java.lang.String destination)
Method that migrates an instanciated connector to another active service USP

migration

public void migration(Connector c)
This method accepts a migrated connector to be installed at this USP

createComponent

public Component createComponent(java.lang.String name,
                                 java.lang.Object[] args)
Methods to create and destroy components (and device components), as well as connectors by reflection (reflective programming)

createComponent

public Component createComponent(java.lang.String name)

createDevComponent

public Component createDevComponent(java.lang.String devImpl,
                                    java.lang.String devInterface,
                                    java.lang.Object[] args)

createDevComponent

public Component createDevComponent(java.lang.String devImpl,
                                    java.lang.String devInterface)

releaseDevComponent

public void releaseDevComponent(java.util.Vector devices)

createConnector

public Connector createConnector(java.lang.String name)

createConnector

public Connector createConnector(java.lang.String name,
                                 java.lang.Object[] args)

createInstance

public java.lang.Object createInstance(java.lang.String impl,
                                       java.lang.Object[] args)
                                throws java.lang.Exception

createInstance

public java.lang.Object createInstance(java.lang.String impl,
                                       java.lang.String name)
                                throws java.lang.Exception

isThisConnectorHere

public boolean isThisConnectorHere(java.lang.String name)

isThisComponentHere

public boolean isThisComponentHere(java.lang.String name)

isThisConnectorHere

public boolean isThisConnectorHere(java.lang.String name,
                                   java.lang.String role)

isThisComponentHere

public boolean isThisComponentHere(java.lang.String name,
                                   java.lang.String role)

isHereTheComponent

public boolean isHereTheComponent(java.lang.String name,
                                  int ident)

addRefTo

public void addRefTo(java.lang.String name,
                     Component c)

addRefTo

public void addRefTo(java.lang.String name,
                     Connector c)

removeComponentRef

public void removeComponentRef(java.lang.String name)

removeConnectorRef

public void removeConnectorRef(java.lang.String name)

addRefTo

public void addRefTo(java.lang.String name,
                     Component c,
                     java.lang.String role)

addRefTo

public void addRefTo(java.lang.String name,
                     Connector c,
                     java.lang.String role)

removeComponentRef

public void removeComponentRef(java.lang.String name,
                               java.lang.String role)

removeConnectorRef

public void removeConnectorRef(java.lang.String name,
                               java.lang.String role)

getUSPByUser

public java.lang.String getUSPByUser(java.lang.String user)
Useful methods for components and connectors.

openRemoteFile

public java.io.InputStreamReader openRemoteFile(java.lang.String filename)