Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Gogo Commands for Remote Services Development

Revision as of 15:29, 23 April 2018 by Slewis.composent.com (Talk | contribs) (Created page with "For ECF's Photon release, a number of commands have been added to allow the listing of several ECF and OSGi Remote Service Admin (RSA) entities: ===ECF entities=== namespace...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

For ECF's Photon release, a number of commands have been added to allow the listing of several ECF and OSGi Remote Service Admin (RSA) entities:

ECF entities

namespaces

containers

container type descriptions

RSA entities

RSA exports

RSA imports

There are also commands to export a service and import an endpoint description via the command line.

These commands have been added via the Apache Felix Gogo Shell which is used for the console in Eclipse, as well as other OSGi runtimes like Felix, Karaf, and others.

ECF Bundles

Two bundles are required: org.eclipse.ecf.console and org.eclipse.ecf.osgi.services.remoteserviceadmin.console. The ECF Remote Services examples and tutorials currently include these two bundles, as do the Bndtools templates.

Commands and Output

Namespaces

Typing help will list all the available commands with their scope, and typing help <command> will produce help for a specific command. e.g.

g! 
g! help
ecf:exportservice
ecf:expsvc
ecf:importservice
ecf:impsvc
ecf:lcfgs
ecf:lcs
ecf:lctds
ecf:lexps
ecf:limps
ecf:listconfigs
ecf:listcontainers
ecf:listexports
ecf:listimports
ecf:listnamespaces
ecf:listtypedescriptions
ecf:lns
ecf:rsadebug
ecf:unexportservice
ecf:unexpsvc
ecf:unimportservice
ecf:unimpsvc
ecf:updateservice
ecf:updsvc
felix:bundlelevel
felix:cd
felix:frameworklevel
felix:headers
felix:help
felix:inspect
felix:install
felix:lb
felix:log
felix:ls
felix:refresh
felix:resolve
felix:start
felix:stop
felix:uninstall
felix:update
felix:which
gogo:cat
gogo:each
gogo:echo
gogo:format
gogo:getopt
gogo:gosh
gogo:grep
gogo:history
gogo:not
gogo:set
gogo:sh
gogo:source
gogo:tac
gogo:telnetd
gogo:type
gogo:until
scr:config
scr:disable
scr:enable
scr:info
scr:list
g! help listnamespaces

listnamespaces
   scope: ecf
   parameters:
      Namespace   Namespace name to list (String)

listnamespaces - List ECF ID namespaces
   scope: ecf
g! 

Command: listnamespaces, lns

Parameters: None -- Produces a table of all Namespaces by Namespace Name

            Namespace Name -- Details about that Namespace

Example:

g! lns
Namespace Name
org.eclipse.ecf.core.identity.GUID
ecf.namespace.generic.remoteservice
ecf.namespace.jmdns
org.eclipse.ecf.core.identity.LongID
org.eclipse.ecf.core.identity.UuID
org.eclipse.ecf.core.identity.StringID
ecf.namespace.remoteservice
ecf.namespace.discovery
org.eclipse.ecf.core.identity.URIID

g! lns ecf.namespace.jmdns
ID=ecf.namespace.jmdns
	UriScheme=jmdns
	Class=org.eclipse.ecf.provider.jmdns.identity.JMDNSNamespace
	Description=JMDNS Discovery Namespace
	InstanceArgTypes=(java.lang.String);(java.lang.String,java.lang.String);(org.eclipse.ecf.discovery.identity.IServiceTypeID);(java.lang.String,java.net.URI)

Container Instances

ECF IContainer instances are used to represent specific connections or sessions.

Command: listcontainers, lcs

Parameters: None -- Produces a table of all containers by container ID

            Container ID -- Details about that container instance

Example:

g! listcontainers
ID                                           |ImplClass                               |Connected
ecftcp://slewis-lenovo:52954/server          |TCPServerSOContainer                    |ecftcp://slewis-lenovo:52954/server

g! lcs ecftcp://slewis-lenovo:52954/server
ID=ecftcp://slewis-lenovo:52954/server
	Namespace=org.eclipse.ecf.core.identity.StringID
	Class=org.eclipse.ecf.provider.generic.TCPServerSOContainer
	ConnectedTo=ecftcp://slewis-lenovo:52954/server
	ConnectNamespace=org.eclipse.ecf.core.identity.StringID
	Config=ecf.generic.server

Container Type Descriptions

Container Type Descriptions (class org.eclipse.ecf.core.ContainerTypeDescription) are descriptions of containers prior to actual instance creation. In effect, container type descriptions define a factory for creating instances of a given type.

Note that Container Type Descriptions Names correspond the the OSGi notion of distribution provider configuration/config type, and can be used with the OSGi standard remote service property service.exported.configs=. For example: service.exported.configs=ecf.generic.server.

Command: listtypedescriptions, lctds, listconfigs, listcfgs

Parameters: None -- Produces a table of all descriptions/config by config name

            Config Name -- Details about that container type config

Example:

g! lctds
ContainerTypeDescription Name
ecf.generic.server
ecf.base
ecf.container.jmdns.locator
ecf.container.jmdns
ecf.generic.ssl.client
ecf.generic.client
ecf.container.jmdns.advertiser
ecf.generic.ssl.server

g! listconfigs ecf.generic.server
ID=ecf.generic.server
	Description=ECF Generic Server
	SupportedConfigs=[ecf.generic.server]
	SupportedIntents=[osgi.basic, osgi.async, osgi.private, passByValue, exactlyOnce, ordered]
	InstanceArgTypes=(org.eclipse.ecf.core.identity.ID);(org.eclipse.ecf.core.identity.ID,java.lang.Integer)
	Adapters=[org.eclipse.ecf.core.sharedobject.ISharedObjectContainerGroupManager, org.eclipse.ecf.core.sharedobject.ISharedObjectContainer, org.eclipse.ecf.provider.comm.IConnectRequestHandler, org.eclipse.ecf.remoteservice.IRemoteServiceContainerAdapter, org.eclipse.ecf.core.IContainer]
	Hidden=false
	Server=true
g! 

Back to the top