com.ibm.wsgw.beans
Interface Channel

All Known Subinterfaces:
ChannelRemote

public interface Channel

The Channel interface encapsulates a listener for service requests.

It provides the methods which the Gateway needs to make services available through the channel.

This interface is intended to be implemented by stateless session beans for each different channel implementation.

Version:
1.18
Author:
 
See Also:

Field Summary
static java.lang.String copyright
          Copyright string.
 
Method Summary
 javax.wsdl.Definition addBinding(java.lang.String gatewayServiceName, java.lang.String namespaceURI, javax.wsdl.Definition definition, java.util.Map targetBindings)
          Adds a channel-specific binding to the given definition.
 void destroy(java.lang.String channelName)
          Notifies the channel that it has been removed from the WebServices Gateway.
 void disableService(java.lang.String gatewayServiceName, java.lang.String namespaceURI, javax.wsdl.Definition definition)
          This method takes a gateway service name service takes whatever actions necessary to stop listening for requests for the given gateway service.
 void enableService(java.lang.String gatewayServiceName, java.lang.String namespaceURI, javax.wsdl.Definition definition, java.lang.Integer partRepresentation, java.util.Properties properties)
          This method takes the gateway service name and a WSDL definition of the target service, and makes that service available via the channel.
 java.lang.String getVersionString()
          This method returns a string form of the version of the channel implementation.
 void init(java.lang.String channelName, java.lang.String endPointAddress)
          Notifies the channel that it has been configured for the WebServices Gateway.
 void processResponse(ResponseCorrelation correl, org.apache.wsif.WSIFResponse response)
          Process an aysncronous response from a service.
 void servicePropertiesChanged(java.lang.String gatewayServiceName, java.util.Properties properties)
          Informs the channel that the properties for the service have changed.
 void start()
          This method informs the Channel that it should start processing service invocations.
 void stop(boolean immediate)
          This method informs the Channel that it should stop processing service invocations.
 

Field Detail

copyright

public static final java.lang.String copyright
Copyright string. Any code placed between the comments will be over written
Method Detail

enableService

public void enableService(java.lang.String gatewayServiceName,
                          java.lang.String namespaceURI,
                          javax.wsdl.Definition definition,
                          java.lang.Integer partRepresentation,
                          java.util.Properties properties)
                   throws WSGWException,
                          java.rmi.RemoteException
This method takes the gateway service name and a WSDL definition of the target service, and makes that service available via the channel.

The channel does whatever is necessary to ensure that it can listen for the new gateway service (for example, the Apache SOAP/HTTP listener must set up a new SOAP provider for each new gateway service).

This method is called by the Gateway when the first target service is added to a gateway service with channels, or when the first channel is added to a gateway service with target services.

Parameters:
gatewayServiceName - The gateway service name.
namespaceURI - The namespace URI for the gateway service.
definition - The service definition.
partRepresentation - The part representation to be used for this service.
properties - The service properties.
Returns:
 
Throws:
WSGWException - The service could not be enabled.
java.rmi.RemoteException - Required for EJB remote interfaces.
See Also:

servicePropertiesChanged

public void servicePropertiesChanged(java.lang.String gatewayServiceName,
                                     java.util.Properties properties)
                              throws WSGWException,
                                     java.rmi.RemoteException
Informs the channel that the properties for the service have changed.
Parameters:
gatewayServiceName - The gateway service name.
properties - The service properties.
Returns:
 
Throws:
WSGWException - The service could not be enabled.
java.rmi.RemoteException - Required for EJB remote interfaces.
See Also:

disableService

public void disableService(java.lang.String gatewayServiceName,
                           java.lang.String namespaceURI,
                           javax.wsdl.Definition definition)
                    throws WSGWException,
                           java.rmi.RemoteException
This method takes a gateway service name service takes whatever actions necessary to stop listening for requests for the given gateway service.

This method is called by the Gateway when a channel is removed from a gateway service, or when the last target service is removed from a gateway service.

Parameters:
gatewayServiceName - The gateway service name.
namespaceURI - The namespace URI for the gateway service.
definition - The service definition.
Returns:
 
Throws:
WSGWException - The service could not be disabled.
java.rmi.RemoteException - Required for EJB remote interfaces.
See Also:

addBinding

public javax.wsdl.Definition addBinding(java.lang.String gatewayServiceName,
                                        java.lang.String namespaceURI,
                                        javax.wsdl.Definition definition,
                                        java.util.Map targetBindings)
                                 throws WSGWException,
                                        java.rmi.RemoteException
Adds a channel-specific binding to the given definition.

This method takes the gateway service name and a WSDL definition of the target service, and modifies the Definition so that it includes binding information to enable clients to send requests for the gateway service to the channel.

This method is called by the Gateway when the exported definition for a gateway service is requested.

Parameters:
gatewayServiceName - The gateway service name.
namespaceURI - The namespace URI for the gateway service.
definition - The service definition.
targetBindings - Bindings from Target Service WSDL
Returns:
The updated WSDL definition
Throws:
WSGWException - The binding could not be added.
java.rmi.RemoteException - Required for EJB remote interfaces.
See Also:

getVersionString

public java.lang.String getVersionString()
                                  throws java.rmi.RemoteException
This method returns a string form of the version of the channel implementation.

This is used by the Gateway when logging events relating to the channel so that the exact version of the channel implementation is known.

Parameters:
-  
Returns:
The version string.
Throws:
java.rmi.RemoteException - Required for EJB remote interfaces.
See Also:

stop

public void stop(boolean immediate)
          throws WSGWException,
                 java.rmi.RemoteException
This method informs the Channel that it should stop processing service invocations.

Any resources associated with the Channel should be released.

The parameter indicates whether requests should be stopped immediately, in which case in-progress requests are discarded, or not, in which in-progress requests are allowed to continue, but new requests are not accepted.

This method is called by the Gateway when it has been asked to stop a channel.

Parameters:
immediate - Indicates whether to abort requests in progress.
Returns:
 
Throws:
WSGWException - The channel could not be stopped.
java.rmi.RemoteException - Required for EJB remote interfaces.
See Also:

start

public void start()
           throws WSGWException,
                  java.rmi.RemoteException
This method informs the Channel that it should start processing service invocations.

Any resources associated with the Channel should be acquired.

Channels are created in the started state.

This method is called by the Gateway when it has been asked to start a channel.

Parameters:
-  
Returns:
 
Throws:
WSGWException - The channel could not be started.
java.rmi.RemoteException - Required for EJB remote interfaces.
See Also:

init

public void init(java.lang.String channelName,
                 java.lang.String endPointAddress)
          throws WSGWException,
                 java.rmi.RemoteException
Notifies the channel that it has been configured for the WebServices Gateway.

This provides the channel with an opportunity to do any initial setup tasks.

Parameters:
channelName - The channel name.
endPointAddress - The end-point address configured for the channel.
Returns:
 
Throws:
WSGWException - An error occurred initializing the channel.
java.rmi.RemoteException - Required for EJB remote interfaces.
See Also:

destroy

public void destroy(java.lang.String channelName)
             throws WSGWException,
                    java.rmi.RemoteException
Notifies the channel that it has been removed from the WebServices Gateway.

This provides the channel with an opportunity to do any cleanup tasks.

Parameters:
channelName - The channel name.
Returns:
 
Throws:
WSGWException - An error occurred removing the channel.
java.rmi.RemoteException - Required for EJB remote interfaces.
See Also:

processResponse

public void processResponse(ResponseCorrelation correl,
                            org.apache.wsif.WSIFResponse response)
                     throws WSGWException,
                            java.rmi.RemoteException
Process an aysncronous response from a service.

Channel specific code must now use ResponseCorrelation to return the WSIFResponse To the original Service caller.

Parameters:
correl - The response correlation object.
response - The response.
Returns:
 
Throws:
WSGWException - An error occurred processing the response.
java.rmi.RemoteException - Required for EJB remote interfaces.
See Also:


Copyright © 2002 IBM. All Rights Reserved.