com.sun.ws.management.client
Interface EnumerableResource

All Superinterfaces:
TransferableResource
All Known Subinterfaces:
Resource

public interface EnumerableResource
extends TransferableResource

An abstract representation of a WS Management resource that focuses on WS-Enumeration.

See Also:
TransferableResource

Field Summary
 
Fields inherited from interface com.sun.ws.management.client.TransferableResource
managementFactory
 
Method Summary
 EnumerationCtx enumerate(java.lang.Object filter, java.util.Map<java.lang.String,java.lang.String> namespaces, java.lang.String dialect, boolean getEpr, boolean getResource)
          Initiates an enumeration transaction by obtaining an enumeration context.
 EnumerationCtx enumerate(java.lang.Object filter, java.util.Map<java.lang.String,java.lang.String> namespaces, java.lang.String dialect, boolean getEpr, boolean getResource, boolean getItemCount, boolean optimized, long timeout, long maxElements)
          Initiates an enumeration transaction by obtaining an enumeration context.
 EnumerationCtx enumerate(java.lang.Object filter, java.util.Map<java.lang.String,java.lang.String> namespaces, java.lang.String dialect, boolean getEpr, boolean getResource, boolean getItemCount, boolean optimized, long timeout, long maxElements, java.lang.Object... params)
          Initiates an enumeration transaction by obtaining an enumeration context.
 java.util.List<com.sun.ws.management.server.EnumerationItem> getEnumerationItems()
          Get the list of the EnumerationItem objects returned from the last successful optimized enumerate or pull.
 java.lang.Long getItemCount()
          Get the total estimated item count, if available.
 boolean isEndOfSequence()
          Indicate if the end of sequence has been reached for this EnumerableResource.
 ResourceState pull(EnumerationCtx enumerationContext, int maxTime, int maxElements, int maxCharacters)
          Requests a list of eprs or objects.
 java.util.List<com.sun.ws.management.server.EnumerationItem> pullItems(EnumerationCtx enumerationContext, int timeout, int maxElements, int maxEnvelopeSize, boolean getItemCount)
          Requests a list of EnumerationItem objects.
 Resource[] pullResources(EnumerationCtx enumerationContext, int maxTime, int maxElements, int maxCharacters, java.lang.String endpointUrl)
          Assumes getEpr was set to true in the original enumerate(Object, Map, String, boolean, boolean) call.
 void release(EnumerationCtx enumerationContext)
          Releases a context for enumeration.
 void renew(EnumerationCtx enumerationContext)
          Renew a context for enumeration.
 
Methods inherited from interface com.sun.ws.management.client.TransferableResource
addOption, addOption, addOption, addOption, delete, delete, delete, get, get, get, getBinding, getDestination, getMaxEnvelopeSize, getMessageTimeout, getOptionSet, getReplyTo, getResourceUri, getSelectorSet, put, put, put, put, resetOptionSet, setBinding, setDestination, setMaxEnvelopeSize, setMessageTimeout, setReplyTo, setResourceUri
 

Method Detail

enumerate

EnumerationCtx enumerate(java.lang.Object filter,
                         java.util.Map<java.lang.String,java.lang.String> namespaces,
                         java.lang.String dialect,
                         boolean getEpr,
                         boolean getResource)
                         throws javax.xml.soap.SOAPException,
                                javax.xml.bind.JAXBException,
                                java.io.IOException,
                                FaultException,
                                javax.xml.datatype.DatatypeConfigurationException
Initiates an enumeration transaction by obtaining an enumeration context. This is a ticket which must be used in all future calls to access this enumeration.

Parameters:
filter - a filter expression to be applied against the enumeration. For Resource.XPATH_DIALECT this should be a string containing the XPath expression. For other dialects this must be an object recognized by the marshaller.
namespaces - prefix and namespace map for namespaces used in the filter expression.
dialect - the dialect to be used in filter expressions. Resource.XPATH_DIALECT can be used for XPath expressions.
getEpr - indicates that the EndpointReference (EPR) for each item is to returned in the pull.
getResource - indicates that the individual items are to be returned in the pull.
Returns:
an enumeration context
Throws:
javax.xml.soap.SOAPException
javax.xml.bind.JAXBException
java.io.IOException
FaultException
javax.xml.datatype.DatatypeConfigurationException

enumerate

EnumerationCtx enumerate(java.lang.Object filter,
                         java.util.Map<java.lang.String,java.lang.String> namespaces,
                         java.lang.String dialect,
                         boolean getEpr,
                         boolean getResource,
                         boolean getItemCount,
                         boolean optimized,
                         long timeout,
                         long maxElements)
                         throws javax.xml.soap.SOAPException,
                                javax.xml.bind.JAXBException,
                                java.io.IOException,
                                FaultException,
                                javax.xml.datatype.DatatypeConfigurationException
Initiates an enumeration transaction by obtaining an enumeration context. This is a ticket which must be used in all future calls to access this enumeration.

Parameters:
filter - a filter expression to be applied against the enumeration. For Resource.XPATH_DIALECT this should be a string containing the XPath expression. For other dialects this must be an object recognized by the marshaller.
namespaces - prefix and namespace map for namespaces used in the filter expression.
dialect - the dialect to be used in filter expressions. Resource.XPATH_DIALECT can be used for XPath expressions.
getEpr - indicates that the EndpointReference (EPR) for each item is to returned in the pull.
getResource - indicates that the individual items are to be returned in the pull.
getItemCount - if true indicates that the estimated item count should be returned
optimized - if true the EnumerationItems will be requested to be returned in the enumerate call. Call getEnumerationItems() to get the list of resources returned in this call.
timeout - the OperationTimeout. This is the maximum amount of time in milliseconds the client is willing to wait for the operation to complete. If <= 0 this parameter is ignored.
maxElements - the maximum number of elements which should be returned. Ignored if optimized is false.
Returns:
an enumeration context
Throws:
javax.xml.soap.SOAPException
javax.xml.bind.JAXBException
java.io.IOException
FaultException
javax.xml.datatype.DatatypeConfigurationException

enumerate

EnumerationCtx enumerate(java.lang.Object filter,
                         java.util.Map<java.lang.String,java.lang.String> namespaces,
                         java.lang.String dialect,
                         boolean getEpr,
                         boolean getResource,
                         boolean getItemCount,
                         boolean optimized,
                         long timeout,
                         long maxElements,
                         java.lang.Object... params)
                         throws javax.xml.soap.SOAPException,
                                javax.xml.bind.JAXBException,
                                java.io.IOException,
                                FaultException,
                                javax.xml.datatype.DatatypeConfigurationException
Initiates an enumeration transaction by obtaining an enumeration context. This is a ticket which must be used in all future calls to access this enumeration.

Parameters:
filter - a filter expression to be applied against the enumeration. For Resource.XPATH_DIALECT this should be a string containing the XPath expression. For other dialects this must be an object recognized by the marshaller.
namespaces - prefix and namespace map for namespaces used in the filter expression.
dialect - the dialect to be used in filter expressions. Resource.XPATH_DIALECT can be used for XPath expressions.
getEpr - indicates that the EndpointReference (EPR) for each item is to returned in the pull.
getResource - indicates that the individual items are to be returned in the pull.
getItemCount - if true indicates that the estimated item count should be returned
optimized - if true the EnumerationItems will be requested to be returned in the enumerate call. Call getEnumerationItems() to get the list of resources returned in this call.
timeout - the OperationTimeout. This is the maximum amount of time in milliseconds the client is willing to wait for the operation to complete. If <= 0 this parameter is ignored.
maxElements - the maximum number of elements which should be returned. Ignored if optimized is false.
params - additional parameters to be marshalled into the Enumerate element in the Body of the request.
Returns:
an enumeration context
Throws:
javax.xml.soap.SOAPException
javax.xml.bind.JAXBException
java.io.IOException
FaultException
javax.xml.datatype.DatatypeConfigurationException

pullResources

Resource[] pullResources(EnumerationCtx enumerationContext,
                         int maxTime,
                         int maxElements,
                         int maxCharacters,
                         java.lang.String endpointUrl)
                         throws javax.xml.soap.SOAPException,
                                javax.xml.bind.JAXBException,
                                java.io.IOException,
                                FaultException,
                                javax.xml.datatype.DatatypeConfigurationException,
                                javax.xml.xpath.XPathExpressionException,
                                NoMatchFoundException
Assumes getEpr was set to true in the original enumerate(Object, Map, String, boolean, boolean) call. Each EPR that is found in the returned resource state will be converted into its own Resource implementation. This is very useful when the response is a collection of EPR's such as when the getEpr parameter is set in the enumerate() call.

Parameters:
enumerationContext - the context created in your call to enumerate
maxTime - the maxium timeout you are willing to wait for a response
maxElements - the maximum number of elements which should be returned
maxCharacters - the total number of the characters to be contained in the returned message. If <= 0 this parameter is ignored. NOTE: Not all servers support this feature.
endpointUrl - URL address of the service.
Returns:
array of Resources pulled
Throws:
javax.xml.soap.SOAPException
javax.xml.bind.JAXBException
java.io.IOException
FaultException
javax.xml.datatype.DatatypeConfigurationException
javax.xml.xpath.XPathExpressionException
NoMatchFoundException

pull

ResourceState pull(EnumerationCtx enumerationContext,
                   int maxTime,
                   int maxElements,
                   int maxCharacters)
                   throws javax.xml.soap.SOAPException,
                          javax.xml.bind.JAXBException,
                          java.io.IOException,
                          FaultException,
                          javax.xml.datatype.DatatypeConfigurationException
Requests a list of eprs or objects. If you request EPRs or some fragment of the state of an object this version of pull will just return them as a resource state and you will have to extract the EPRs yourself. Use pullResources for better access to EPRs.

Parameters:
enumerationContext - the context created in your call to enumerate
maxTime - the maxium timeout you are willing to wait for a response
maxElements - the maximum number of elements which should be returned
maxCharacters - the total number of the characters to be contained in the returned message. If <= 0 this parameter is ignored. NOTE: Not all servers support this feature.
Returns:
A resource state representing the returned complex type of the pull. Often this state will contain multiple entries from a number of resources.
Throws:
javax.xml.soap.SOAPException
javax.xml.bind.JAXBException
java.io.IOException
FaultException
javax.xml.datatype.DatatypeConfigurationException

pullItems

java.util.List<com.sun.ws.management.server.EnumerationItem> pullItems(EnumerationCtx enumerationContext,
                                                                       int timeout,
                                                                       int maxElements,
                                                                       int maxEnvelopeSize,
                                                                       boolean getItemCount)
                                                                       throws javax.xml.soap.SOAPException,
                                                                              javax.xml.bind.JAXBException,
                                                                              java.io.IOException,
                                                                              FaultException,
                                                                              javax.xml.datatype.DatatypeConfigurationException
Requests a list of EnumerationItem objects. Depending on the request options specified in the enumerate(Object, Map, String, boolean, boolean) call this may return the resource, its EPR or both.

Parameters:
enumerationContext - The context created from a previous enumerate call.
timeout - the OperationTimeout. This is the maximum amount of time in milliseconds the client is willing to wait for the operation to complete. If <= 0 this parameter is ignored.
maxElements - the maximum number of elements which should be returned
maxEnvelopeSize - the desired maximum envelope size for the returned SOAP envelope. If <= 0 this parameter is ignored.
getItemCount - if true indicates that the estimated item count should be returned
Returns:
a list of EnumerationItem objects
Throws:
javax.xml.soap.SOAPException
javax.xml.bind.JAXBException
java.io.IOException
FaultException
javax.xml.datatype.DatatypeConfigurationException

release

void release(EnumerationCtx enumerationContext)
             throws javax.xml.soap.SOAPException,
                    javax.xml.bind.JAXBException,
                    java.io.IOException,
                    FaultException,
                    javax.xml.datatype.DatatypeConfigurationException
Releases a context for enumeration.

Parameters:
enumerationContext - ID of the context to release
Throws:
javax.xml.datatype.DatatypeConfigurationException
FaultException
java.io.IOException
javax.xml.bind.JAXBException
javax.xml.soap.SOAPException

renew

void renew(EnumerationCtx enumerationContext)
           throws javax.xml.soap.SOAPException,
                  javax.xml.bind.JAXBException,
                  java.io.IOException,
                  FaultException,
                  javax.xml.datatype.DatatypeConfigurationException
Renew a context for enumeration.

Parameters:
enumerationContext - ID of the context to renew
Throws:
javax.xml.datatype.DatatypeConfigurationException
FaultException
java.io.IOException
javax.xml.bind.JAXBException
javax.xml.soap.SOAPException

getItemCount

java.lang.Long getItemCount()
Get the total estimated item count, if available.

Returns:
the total estimated item count.

getEnumerationItems

java.util.List<com.sun.ws.management.server.EnumerationItem> getEnumerationItems()
Get the list of the EnumerationItem objects returned from the last successful optimized enumerate or pull.

Returns:
list of EnumerationItem objects from last successful optimized enumerate or pull

isEndOfSequence

boolean isEndOfSequence()
Indicate if the end of sequence has been reached for this EnumerableResource.

Returns:
true if this EnumerableResource is at the end of sequence