org.apache.wsif.providers
Class ModelWSIFPort

java.lang.Object
  extended byorg.apache.wsif.providers.ModelWSIFPort
All Implemented Interfaces:
java.io.Serializable, WSIFPort

public abstract class ModelWSIFPort
extends java.lang.Object
implements WSIFPort

ModelWSIFPort Models are provided for all the classes required to be implemented when writing a WSIF provider: WSIFProvider, WSIFPort, and WSIFOperation. The models are intended to simplify the work in the implementing subclasses, and insure that all providers work in standard way. Things like hunting around in the WSDL for ExtensabilityElements and verifying the types of request and response objects against the WSDL should be done in the model code. Subclasses should only need to provide code directly related to accessing the particular service type they implement. For a subclass to use ModelWSIFPort, as a minimum it would implement the makeWSIFOperation method, and the getImplementedAddressClass and validateAddress methods to define and validate the WSDL port address extensibility element being used by the provider. Other methods may be overriden to customise the behaviour, see the method javadoc for details.

Author:
Ant Elder
See Also:
Serialized Form

Constructor Summary
ModelWSIFPort(javax.wsdl.Definition def, javax.wsdl.Port port, WSIFDynamicTypeMap typeMap)
          Construct a ModelWSIFPort
ModelWSIFPort(javax.wsdl.Definition def, javax.wsdl.Service service, javax.wsdl.Port port, WSIFDynamicTypeMap typeMap, javax.wsdl.extensions.ExtensibilityElement binding)
          Construct a ModelWSIFPort
 
Method Summary
abstract  void close()
          Close this port; indicates that the user is done using it.
 WSIFOperation createOperation(java.lang.String opName)
          Create a new WSIFOperation.
 WSIFOperation createOperation(java.lang.String opName, java.lang.String inputName, java.lang.String outputName)
          Create a new WSIFOperation.
 java.lang.String deep()
          String representation of this WSIFPort for WSIF Trc.
 void finalize()
          Override java.lang.Object finalize method to close the WSIFPort
 javax.wsdl.extensions.ExtensibilityElement getBinding()
          Returns the binding ExtensibilityElement.
 WSIFMessage getContext()
          Gets the context information for this WSIFPort.
 javax.wsdl.Definition getDefinition()
          Returns the WSDL Definition object
 javax.wsdl.Port getPort()
          Returns the WSDL port.
 javax.wsdl.Service getService()
          Returns the WSDL service.
 WSIFDynamicTypeMap getTypeMap()
          Returns the typeMap.
 boolean isCacheOperations()
          Returns the cacheOperations.
 boolean isFormatBindingSupported()
          Returns the formatBindingSupported.
 void setContext(WSIFMessage context)
          Sets the context information for this WSIFPort.
 boolean supportsAsync()
          Tests if this port supports asynchronous calls to operations.
 boolean supportsSync()
          Tests if this port supports synchronous calls to operations.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModelWSIFPort

public ModelWSIFPort(javax.wsdl.Definition def,
                     javax.wsdl.Port port,
                     WSIFDynamicTypeMap typeMap)
              throws WSIFException
Construct a ModelWSIFPort


ModelWSIFPort

public ModelWSIFPort(javax.wsdl.Definition def,
                     javax.wsdl.Service service,
                     javax.wsdl.Port port,
                     WSIFDynamicTypeMap typeMap,
                     javax.wsdl.extensions.ExtensibilityElement binding)
              throws WSIFException
Construct a ModelWSIFPort

Method Detail

createOperation

public WSIFOperation createOperation(java.lang.String opName)
                              throws WSIFException
Description copied from interface: WSIFPort
Create a new WSIFOperation. There must be exactly one operation in this port's portType with this name. For overloaded operations see WSIFPort.createOperation(String,String,String).

Specified by:
createOperation in interface WSIFPort
Parameters:
opName - the name of an operation in this port's portType
Returns:
the new WSIFOperation
Throws:
WSIFException - if something goes wrong
See Also:
WSIFPort.createOperation(String)

createOperation

public WSIFOperation createOperation(java.lang.String opName,
                                     java.lang.String inputName,
                                     java.lang.String outputName)
                              throws WSIFException
Description copied from interface: WSIFPort
Create a new WSIFOperation. There must be an operation in this port's portType with this operation name, input message name and output message name. The input message name distinguishes overloaded operations.

Specified by:
createOperation in interface WSIFPort
Parameters:
opName - the name of an operation in this port's portType
inputName - the input message name
outputName - the output message name
Returns:
the new WSIFOperation
Throws:
WSIFException - if something goes wrong
See Also:
WSIFPort.createOperation(String, String, String)

isCacheOperations

public boolean isCacheOperations()
Returns the cacheOperations.

Returns:
boolean

getBinding

public javax.wsdl.extensions.ExtensibilityElement getBinding()
Returns the binding ExtensibilityElement.

Returns:
ExtensibilityElement

getDefinition

public javax.wsdl.Definition getDefinition()
Returns the WSDL Definition object

Returns:
Definition

getPort

public javax.wsdl.Port getPort()
Returns the WSDL port.

Returns:
Port

getService

public javax.wsdl.Service getService()
Returns the WSDL service.

Returns:
Service

getTypeMap

public WSIFDynamicTypeMap getTypeMap()
Returns the typeMap.

Returns:
WSIFDynamicTypeMap

getContext

public WSIFMessage getContext()
                       throws WSIFException
Gets the context information for this WSIFPort.

Specified by:
getContext in interface WSIFPort
Returns:
context
Throws:
WSIFException

setContext

public void setContext(WSIFMessage context)
Sets the context information for this WSIFPort.

Specified by:
setContext in interface WSIFPort

supportsSync

public boolean supportsSync()
Tests if this port supports synchronous calls to operations.

Specified by:
supportsSync in interface WSIFPort
Returns:
true by default WSIFPorts do support synchronous calls

supportsAsync

public boolean supportsAsync()
Tests if this port supports asynchronous calls to operations.

Specified by:
supportsAsync in interface WSIFPort
Returns:
false by default ports do not support asynchronous calls

isFormatBindingSupported

public boolean isFormatBindingSupported()
Returns the formatBindingSupported.

Returns:
boolean

finalize

public void finalize()
              throws java.lang.Throwable
Override java.lang.Object finalize method to close the WSIFPort

Throws:
java.lang.Throwable

close

public abstract void close()
                    throws WSIFException
Description copied from interface: WSIFPort
Close this port; indicates that the user is done using it. This is only essential for WSIFPorts that are being used in a stateful or resource-shared manner. Responsible stubs will call this if feasible at the right time.

Specified by:
close in interface WSIFPort
Throws:
WSIFException - if something goes wrong

deep

public java.lang.String deep()
String representation of this WSIFPort for WSIF Trc.



Copyright ? 2002, 2006 Apache XML Project. All Rights Reserved.