|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.systinet.wasp.webservice.Registry
Registry allows runtime publishing and finding of web services. For instance:
Wasp.startServer("http"); Registry.publish("/MyService", new MyServiceImpl());It also allows the simplest way of service lookup with creating dynamic proxy for the service:
MyService proxy = (MyService)Registry.lookup("http://googoo:6060/MyService/wsdl", MyService.class);For more complex client lookup see
ServiceClient
.
Method Summary | |
static void |
addListener(ServiceClientListener listener)
Adds service client listener. |
static void |
addListener(ServiceEndpointListener listener)
Adds service endpoint listener. |
static ServiceEndpoint |
getServiceEndpoint(java.lang.String path)
Gets the service endpoint bound to specified path. |
static ServiceEndpoint |
getServiceEndpoint(java.lang.String path,
java.lang.String version)
Gets the service endpoint bound to specified path. |
static ServiceEndpoint[] |
getServiceEndpoints()
Gets all service endpoints published or deployed to server. |
static java.lang.Object |
lookup(ServiceClient clientConfiguration)
Deprecated. use ServiceClient.createProxy(java.lang.Class) instead |
static java.lang.Object |
lookup(java.lang.String definitionURL,
java.lang.Class iface)
Performs service lookup and creates dynamic proxy for the web service described by WSDL document at definitionURL when ServiceClient
is not needed (for settings of additional parameters or client processing). |
static java.lang.Object |
lookup(java.lang.String definitionURL,
java.lang.Class iface,
java.lang.String serviceURL,
java.util.Map contextData)
Deprecated. use ServiceClient.create(java.lang.String, java.util.Map) and
ServiceClient.createProxy(java.lang.Class) instead |
static void |
publish(ServiceEndpoint serviceEndpoint)
Publishes and starts the service. |
static ServiceEndpoint |
publish(java.lang.String path,
java.lang.Class implementationClass)
Publishes and starts new service. |
static ServiceEndpoint |
publish(java.lang.String path,
java.lang.Object implementationObject)
Publishes and starts new service. |
static void |
removeListener(ServiceClientListener listener)
Removes service client listener. |
static void |
removeListener(ServiceEndpointListener listener)
Removes service endpoint listener. |
static void |
unpublish(ServiceEndpoint serviceEndpoint)
Removes service endpoint. |
static ServiceEndpoint |
unpublish(java.lang.String path)
Removes service endpoint. |
static ServiceEndpoint |
unpublish(java.lang.String path,
java.lang.String version)
Removes service endpoint. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static final void publish(ServiceEndpoint serviceEndpoint) throws PublishException
ServiceEndpoint endpoint = ServiceEndpoint.create("/HelloWorld", new HelloWorldImpl()); endpoint.getInterceptors().add(new MyInterceptor(), Interceptors.DIRECTION_INOUT); ... Registry.publish(endpoint);Note: You can publish the service simply by calling:
Registry.publish(ServiceEndpoint.create("/HelloWorld", new HelloWorldImpl()));
serviceEndpoint
- service endpoint to be published
PublishException
- when the service endpoint path
already existspublic static final ServiceEndpoint publish(java.lang.String path, java.lang.Class implementationClass) throws PublishException
path
- service pathimplementationClass
- service implementation class
PublishException
- when the service endpoint path
already existspublish(ServiceEndpoint)
public static final ServiceEndpoint publish(java.lang.String path, java.lang.Object implementationObject) throws PublishException
path
- service pathimplementationObject
- service implementation
PublishException
- when the service endpoint path
already existspublish(ServiceEndpoint)
public static final void unpublish(ServiceEndpoint serviceEndpoint) throws PublishException
serviceEndpoint.getServiceInstance()
service instance.
serviceEndpoint
- service endpoint to be removed
PublishException
- when service at given endpoint path
does not existpublic static final ServiceEndpoint unpublish(java.lang.String path) throws PublishException
path
- endpoint path
PublishException
- when service at given endpoint path
does not existunpublish(ServiceEndpoint)
public static final ServiceEndpoint unpublish(java.lang.String path, java.lang.String version) throws PublishException
path
- endpoint pathversion
- version of the endpoint to unpublish
PublishException
- when service at given endpoint path
does not existunpublish(ServiceEndpoint)
,
ServiceEndpoint.setVersion(java.lang.String)
public static final java.lang.Object lookup(ServiceClient clientConfiguration) throws LookupException
ServiceClient.createProxy(java.lang.Class)
instead
clientConfiguration
.
clientConfiguration
- client configuration specifying service
definition URL and other lookup parameters
LookupException
- when error occurs during lookuppublic static final java.lang.Object lookup(java.lang.String definitionURL, java.lang.Class iface) throws LookupException
definitionURL
when ServiceClient
is not needed (for settings of additional parameters or client processing).
definitionURL
- URL of WSDL document describing the serviceiface
- service interface
LookupException
- when error occurs during lookuppublic static final java.lang.Object lookup(java.lang.String definitionURL, java.lang.Class iface, java.lang.String serviceURL, java.util.Map contextData) throws LookupException
ServiceClient.create(java.lang.String, java.util.Map)
and
ServiceClient.createProxy(java.lang.Class)
instead
definitionURL
and hosted at
serviceURL
(overriding service URL from WSDL document).
There can be also specified additional context data that is put into
the ServiceClientContext
which is created during the lookup
operation.
definitionURL
- URL of WSDL document describing the serviceiface
- service interfaceserviceURL
- URL of service - if the value is not null
then it specifies preferred service URL from WSDL document and if
no service with such URL exists, then it overrides the URL of
the most suitable service from WSDL document (choosen by the
other criteria)contextData
- null
or data used to configure the
lookup operation and stub
LookupException
- when error occurs during lookupServiceClientContext
public static final ServiceEndpoint[] getServiceEndpoints()
public static final ServiceEndpoint getServiceEndpoint(java.lang.String path)
path
- endpoint path
public static final ServiceEndpoint getServiceEndpoint(java.lang.String path, java.lang.String version)
null
in case there are only endpoints with different
versions published.
path
- endpoint pathversion
- the required version
ServiceEndpoint.setVersion(java.lang.String)
public static final void addListener(ServiceEndpointListener listener)
listener
- listener to addpublic static final void removeListener(ServiceEndpointListener listener)
listener
- listenr to removepublic static final void addListener(ServiceClientListener listener)
listener
- listener to addpublic static final void removeListener(ServiceClientListener listener)
listener
- listener to remove
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |