# ------------------------------------------------------------------------------ # Implementation of SERVICE_EXPORT_DISTRIBUTION_PROVIDER @ComponentFactory("xmlrpc-export-distribution-provider-factory") @Provides(SERVICE_EXPORT_DISTRIBUTION_PROVIDER) @Property("_config_name", "config_name", ECF_XMLRPC_SERVER_CONFIG) @Property("_namespace", "namespace", ECF_XMLRPC_NAMESPACE) @Property("_supported_configs", "supported_configs", ECF_XMLRPC_SUPPORTED_CONFIGS) @Property("_supported_intents", "supported_intents", ECF_XMLRPC_SUPPORTED_INTENTS) @Requires("_httpservice", HTTP_SERVICE) @Property( "_uri_path", prop_dot_suffix(ECF_XMLRPC_SERVER_CONFIG, ECF_XMLRPC_PATH_PROP), "/xml-rpc", ) @Property( "_timeout", prop_dot_suffix(ECF_XMLRPC_SERVER_CONFIG, ECF_XMLRPC_TIMEOUT_PROP), 30, ) @Property( "_hostname", prop_dot_suffix(ECF_XMLRPC_SERVER_CONFIG, ECF_XMLRPC_HOSTNAME_PROP), "localhost", ) @Instantiate("xmlrpc-export-distribution-provider") class XmlRpcExportDistributionProvider(ExportDistributionProvider): """
@Property("_namespace", "namespace", ECF_PY4J_NAMESPACE) @Property( "_supported_configs", "supported_configs", [ECF_PY4J_PYTHON_HOST_CONFIG_TYPE, ECF_PY4J_PYTHON_CONSUMER_CONFIG_TYPE], ) @Property("_supported_intents", "supported_intents", ECF_PY4J_SUPPORTED_INTENTS) @Property( "_supported_pb_intents", "supported_pb_intents", ECF_PY4JPB_SUPPORTED_INTENTS, ) @Property( "_javaport", prop_dot_suffix(ECF_PY4J_CONTAINER_CONFIG_TYPE, ECF_PY4J_JAVA_PORT_PROP), DEFAULT_PORT, ) @Property( "_pythonport", prop_dot_suffix(ECF_PY4J_CONTAINER_CONFIG_TYPE, ECF_PY4J_PYTHON_PORT_PROP), DEFAULT_PYTHON_PROXY_PORT, ) @Property( "_default_service_timeout", prop_dot_suffix( ECF_PY4J_CONTAINER_CONFIG_TYPE, ECF_PY4J_DEFAULT_SERVICE_TIMEOUT ), 30, ) @Instantiate("py4j-distribution-provider")
ETCD_NAME_PROP = "etcd" ETCD_HOSTNAME_PROP = "hostname" ETCD_PORT_PROP = "port" ETCD_TOPPATH_PROP = "toppath" ETCD_SESSIONTTL_PROP = "sessionttl" ETCD_WATCHSTART_WAIT_PROP = "watchstartwait" # ------------------------------------------------------------------------------ @ComponentFactory("etcd-endpoint-discovery-factory") @Provides(SERVICE_ENDPOINT_ADVERTISER) @Property( "_hostname", prop_dot_suffix(ETCD_NAME_PROP, ETCD_HOSTNAME_PROP), "localhost", ) @Property("_port", prop_dot_suffix(ETCD_NAME_PROP, ETCD_PORT_PROP), 2379) @Property( "_top_path", prop_dot_suffix(ETCD_NAME_PROP, ETCD_TOPPATH_PROP), "/org.eclipse.ecf.provider.etcd.EtcdDiscoveryContainer", ) @Property("_session_ttl", prop_dot_suffix(ETCD_NAME_PROP, ETCD_SESSIONTTL_PROP), 30) @Property( "_watch_start_wait", prop_dot_suffix(ETCD_NAME_PROP, ETCD_WATCHSTART_WAIT_PROP), 5, )
# ------------------------------------------------------------------------------ @ComponentFactory("rsa-command-factory") @Requires("_utils", SERVICE_SHELL_UTILS) @Requires("_rsa", SERVICE_REMOTE_SERVICE_ADMIN) @Requires("_imp_containers", SERVICE_IMPORT_CONTAINER, True, True) @Requires("_exp_containers", SERVICE_EXPORT_CONTAINER, True, True) @Requires("_imp_dist_providers", SERVICE_IMPORT_DISTRIBUTION_PROVIDER, True, True) @Requires("_exp_dist_providers", SERVICE_EXPORT_DISTRIBUTION_PROVIDER, True, True) @Provides([SERVICE_SHELL_COMMAND]) @Property( "_edef_filename", prop_dot_suffix(RSA_COMMAND_NAME_PROP, RSA_COMMAND_FILENAME_PROP), "edef.xml", ) @Property( "_export_config", prop_dot_suffix(RSA_COMMAND_NAME_PROP, RSA_COMMAND_EXPORT_CONFIG_PROP), "ecf.xmlrpc.ycappuccino_core", ) @Instantiate("rsa-command") class RSACommandHandler(object): """ RSA implementation of command handler service...e.g. SERVICE_SHELL_COMMAND Exposes a number of shell commands for RSA operations...e.g. exportservice importservice, listconfigs, listproviders, listcontainers, etc """
@ComponentFactory("rsa-command-factory") @Requires("_utils", SERVICE_SHELL_UTILS) @Requires("_rsa", SERVICE_REMOTE_SERVICE_ADMIN) @Requires("_imp_containers", SERVICE_IMPORT_CONTAINER, True, True) @Requires("_exp_containers", SERVICE_EXPORT_CONTAINER, True, True) @Requires( "_imp_dist_providers", SERVICE_IMPORT_DISTRIBUTION_PROVIDER, True, True ) @Requires( "_exp_dist_providers", SERVICE_EXPORT_DISTRIBUTION_PROVIDER, True, True ) @Provides([SERVICE_SHELL_COMMAND]) @Property( "_edef_filename", prop_dot_suffix(RSA_COMMAND_NAME_PROP, RSA_COMMAND_FILENAME_PROP), "edef.xml", ) @Property( "_export_config", prop_dot_suffix(RSA_COMMAND_NAME_PROP, RSA_COMMAND_EXPORT_CONFIG_PROP), "ecf.xmlrpc.server", ) @Instantiate("rsa-command") class RSACommandHandler(object): """ RSA implementation of command handler service...e.g. SERVICE_SHELL_COMMAND Exposes a number of shell commands for RSA operations...e.g. exportservice importservice, listconfigs, listproviders, listcontainers, etc """