Interface org.as2lib.io.conn.core.server.Server

Description

Server acts as a composite for many services that are all combined in one domain.

Method Index

addService(), getHost(), getService(), isRunning(), putService(), removeService(), run(), stop()

Inherited from BasicInterface

Method Detail

run

public function run(Void):Void

Runs this server and all added services.

stop

public function stop(Void):Void

Stops all added services and this server.

putService

public function putService(path:String, service):ServerServiceProxy

Puts the passed-in service to the passed-in path on this server.

This means after starting this server you can invoke methods on the passed-in service using the server host plus the service path as url.

Parameters

paththe path through which the service can be accessed on this server
servicethe actual service which provides the functionalities

Return

the service proxy that wraps the passed-in service and path

See Also

addService

public function addService(serviceProxy:ServerServiceProxy):Void

Adds the passed-in serviceProxy to this server.

Parameters

serviceProxythe proxy to add to this server

See Also

removeService

public function removeService(path:String):ServerServiceProxy

Removes the service corresponding to the passed-in path from this server.

Parameters

paththe full path of the service to remove

Return

a service proxy that wraps the actual service

getService

public function getService(path:String):ServerServiceProxy

Returns the service corresponding to the passed-in service path.

Parameters

paththe full path of the service to return

Return

a service proxy wrapping the actual service

getHost

public function getHost(Void):String

Returns the name of this server.

Return

the name of this server

isRunning

public function isRunning(Void):Boolean

Returns whether this server is running.

Return

true if this server is running else false