|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.UCL.xmiddle.SimpleManager
This is the API that XMIDDLE presents to the application developer. All middleware functionalities can be accessed by the developer from here. In other words this class provides a high level view of XMIDDLE
Field Summary |
Fields inherited from interface edu.UCL.xmiddle.framework.Manager |
CONNECTED, DISCONNECTED |
Constructor Summary | |
SimpleManager()
|
Method Summary | |
void |
addHostListener(Host host,
HostListener application)
Adds a HostListener object for the given Host object. |
void |
addHostListener(HostListener application)
Adds a HostListener object. |
void |
addHostListenerPrimID(java.lang.Object primID,
HostListener application)
Adds a HostListener object for the Host object identified by the given primary ID. |
void |
addHostListenerSecID(java.lang.Object secID,
HostListener application)
Adds a HostListener object for the Host object identified by the given primary ID. |
void |
close(org.w3c.dom.Element element,
java.lang.Integer appID)
Commits the changes performed on the given Element . |
boolean |
connect()
Connects to the network. |
void |
deleteApplication(java.lang.Integer param1)
Currently not implemented |
void |
disconnect()
Disconnects from the network. |
void |
exit()
Terminates the middleware services. |
boolean |
export(org.w3c.dom.Element element,
java.lang.Integer appID)
Starts exporting the given element. |
boolean |
export(java.lang.String path,
java.lang.Integer appID)
Starts exporting the given element. |
java.util.Enumeration |
getExports()
Returns the ExportList. |
java.util.Enumeration |
getHosts()
Returns the list of the hosts that are currently in reach. |
static SimpleManager |
getInstance()
Returns an instance of the SimpleManager object. |
java.util.Enumeration |
getLinkedBy()
Returns the LinkedBy table. |
java.util.Enumeration |
getLinkedFrom()
Returns the LinkedFrom table. |
java.lang.Object |
getPrimaryID()
Returns the primary ID of the local host. |
ApplicationProfile |
getProfile(java.lang.Integer appID)
Returns the profile of the application with the given ID. |
java.lang.Object |
getSecondary()
Returns the secondary ID of the local host. |
java.lang.Object |
getSecondaryID()
Returns the secondary ID of the local host. |
boolean |
getStatus()
Returns the connection status (CONNECTED or DISCONNECTED). |
void |
init()
Initialises a new XMIDDLE session. |
void |
link(Host host,
java.lang.Integer appID,
java.lang.String remoteExport,
java.lang.Integer localAppID,
org.w3c.dom.Element localRoot)
Links to a remote element (mounting of a sub-tree exported by another host). |
org.w3c.dom.Element |
open(java.lang.String path,
java.lang.Integer appID)
Retrieves a sub-tree identified by the given XPath expression. |
void |
print(java.lang.String param1)
Not implemented (should print debugging info) |
void |
println(java.lang.String param1)
Not implemented (should print debugging info) |
void |
queue(java.lang.Object[] param1)
Queues a protocol request to the Localhost thread. |
java.lang.Integer |
registerApplication(XApp app)
Registers a new application to the middleware. |
void |
registerProtocol(java.lang.String className,
java.lang.String protocolName)
Registers a new protocol as available to the middleware. |
void |
removeHostListener(Host host,
HostListener application)
Removes the given HostListener object, referring to the given host. |
void |
removeHostListener(HostListener application)
Removes the given HostListener object. |
void |
removeHostListenerPrimID(java.lang.Object primID,
HostListener application)
Removes the given HostListener object, referring to the given host identified by the given primary ID. |
void |
removeHostListenerSecID(java.lang.Object secID,
HostListener application)
Removes the given HostListener object, referring to the given host identified by the given secondary ID. |
void |
resume()
Not implemented |
void |
send(Data param1)
Sends a data packet to another host. |
void |
suspend()
Not implemented |
void |
sync(Host host,
java.lang.Integer origAppID,
java.lang.String origPath,
java.lang.Integer localAppID,
java.lang.String localPath)
Synchronizes (reconciles) our data with the given Host . |
void |
unexport(org.w3c.dom.Element element,
java.lang.Integer appID)
Stops exporting the given element. |
void |
unexport(java.lang.String path,
java.lang.Integer appID)
Stops exporting the given element. |
void |
unlink(org.w3c.dom.Element element,
java.lang.Integer appID)
Stops linking to the specified element of the specified ID. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SimpleManager()
Method Detail |
public void addHostListener(HostListener application)
HostListener
object.
addHostListener
in interface Manager
application
- the object to be notified.public void addHostListener(Host host, HostListener application)
HostListener
object for the given Host
object.
addHostListener
in interface Manager
host
- the host that needs a Host Listener
.application
- the host listenerpublic void addHostListenerPrimID(java.lang.Object primID, HostListener application)
HostListener
object for the Host
object identified by the given primary ID.
addHostListenerPrimID
in interface Manager
primID
- the primary ID of the hostapplication
- the host listener.public void addHostListenerSecID(java.lang.Object secID, HostListener application)
HostListener
object for the Host
object identified by the given primary ID.
addHostListenerSecID
in interface Manager
application
- the host listenersecID
- The host, identified (NOT uniquely) by its
secondary ID.public void removeHostListener(HostListener application)
HostListener
object.
removeHostListener
in interface Manager
application
- the host listenerpublic void removeHostListener(Host host, HostListener application)
HostListener
object, referring to the given host.
removeHostListener
in interface Manager
host
- the hostapplication
- the host listenerpublic void removeHostListenerPrimID(java.lang.Object primID, HostListener application)
HostListener
object, referring to the given host identified by the given primary ID.
removeHostListenerPrimID
in interface Manager
primID
- the primaryID of the hostapplication
- the host listenerpublic void removeHostListenerSecID(java.lang.Object secID, HostListener application)
HostListener
object, referring to the given host identified by the given secondary ID.
removeHostListenerSecID
in interface Manager
secID
- the secondary ID of the hostapplication
- the host listenerpublic void deleteApplication(java.lang.Integer param1)
deleteApplication
in interface Manager
param1
- public ApplicationProfile getProfile(java.lang.Integer appID)
getProfile
in interface Manager
appID
- the ID of the application the profile of which is requested
public java.lang.Integer registerApplication(XApp app)
registerApplication
in interface Manager
app
- the application to be registered
public void registerProtocol(java.lang.String className, java.lang.String protocolName)
registerProtocol
in interface Manager
className
- the absolute class name of the protocol (which must
extend edu.UCL.xmiddle.framework.lib.protocols.Protocol
protocolName
- the unique name by which this protocol is identifiedpublic java.util.Enumeration getLinkedFrom()
getLinkedFrom
in interface Manager
public java.util.Enumeration getLinkedBy()
getLinkedBy
in interface Manager
public java.util.Enumeration getExports()
getExports
in interface Manager
public void unlink(org.w3c.dom.Element element, java.lang.Integer appID)
unlink
in interface Manager
appID
- the application ID on the tree of which this
element residespublic void link(Host host, java.lang.Integer appID, java.lang.String remoteExport, java.lang.Integer localAppID, org.w3c.dom.Element localRoot)
link
in interface Manager
host
- the host on which the (exported) element residesappID
- the application ID of the remote application
exporting the elementremoteExport
- the exported element itself as advertised
by the applicationlocalAppID
- the local application ID on the tree of which
we want the linked element to residelocalRoot
- the local root element under which the linked
element will be placedpublic void sync(Host host, java.lang.Integer origAppID, java.lang.String origPath, java.lang.Integer localAppID, java.lang.String localPath)
Host
.
sync
in interface Manager
host
- the host on which the element resides.localAppID
- the application ID on the localhost.localPath
- the path name on the localhost.public void queue(java.lang.Object[] param1)
Localhost
thread.
queue
in interface Manager
param1
- the request, as an Object[]
valuepublic void send(Data param1)
send
in interface Manager
param1
- the Data
packet to sendpublic void unexport(org.w3c.dom.Element element, java.lang.Integer appID)
unexport
in interface Manager
element
- the element to stop exportingappID
- the application ID to which this element belongspublic void unexport(java.lang.String path, java.lang.Integer appID)
unexport
in interface Manager
path
- the element to stop exporting (as XPath)appID
- the application ID to which this element belongspublic boolean export(org.w3c.dom.Element element, java.lang.Integer appID)
export
in interface Manager
element
- the element to exportappID
- the ID of the application under the tree of which
the given element resides
public boolean export(java.lang.String path, java.lang.Integer appID)
export
in interface Manager
path
- the element to be exported (XPath)appID
- the ID of the application under the tree of which
the given element resides
public boolean getStatus()
getStatus
in interface Manager
public void disconnect()
disconnect
in interface Manager
public boolean connect()
connect
in interface Manager
public java.util.Enumeration getHosts()
getHosts
in interface Manager
UDPHost
s currently in reachpublic void close(org.w3c.dom.Element element, java.lang.Integer appID)
Element
.
close
in interface Manager
element
- The element to "close"appID
- The ID of the application under the tree of which
the given element resides.public org.w3c.dom.Element open(java.lang.String path, java.lang.Integer appID)
open
in interface Manager
appID
- the id of the application under the tree of which
the given element residespath
- an xpath expression describing the element to open.
public java.lang.Object getPrimaryID()
getPrimaryID
in interface Manager
public java.lang.Object getSecondary()
public java.lang.Object getSecondaryID()
getSecondaryID
in interface Manager
public void println(java.lang.String param1)
println
in interface Manager
param1
- public void print(java.lang.String param1)
print
in interface Manager
param1
- public void exit()
exit
in interface Manager
public void resume()
resume
in interface Manager
public void suspend()
suspend
in interface Manager
public void init()
init
in interface Manager
public static SimpleManager getInstance()
SimpleManager
object.
SimpleManager
object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |