|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.ws.management.client.ResourceFactory
public class ResourceFactory
Factory to create and configure Resource
objects for use by a client. Provides additional support
methods to obtain the ServerIdentity
metadata.
Resource
,
EnumerableResource
,
TransferableResource
,
ServerIdentity
Field Summary | |
---|---|
static java.lang.String |
LATEST
|
Method Summary | |
---|---|
static Resource |
create(java.lang.String destination,
java.lang.String resourceURI,
long timeoutInMilliseconds,
org.w3c.dom.Document content,
java.lang.String specVersion)
Creates a new resource instance on the server. |
static Resource |
create(java.lang.String destination,
java.lang.String resourceURI,
long timeoutInMilliseconds,
org.w3c.dom.Document content,
java.lang.String specVersion,
java.util.HashSet<org.dmtf.schemas.wbem.wsman._1.wsman.OptionType> optionSet)
Creates a new resource instance on the server. |
static Resource |
create(java.lang.String destination,
java.lang.String resourceURI,
org.dmtf.schemas.wbem.wsman._1.wsman.SelectorSetType existingResourceId,
long timeoutInMilliseconds,
java.lang.Object content,
java.lang.String specVersion,
java.util.HashSet<org.dmtf.schemas.wbem.wsman._1.wsman.OptionType> optionSet,
java.lang.Object expression,
java.util.Map<java.lang.String,java.lang.String> namespaces,
java.lang.String dialect)
Create a new resource on the server. |
static Resource |
createFragment(java.lang.String destination,
java.lang.String resourceURI,
org.dmtf.schemas.wbem.wsman._1.wsman.SelectorSetType existingResourceId,
long timeoutInMilliseconds,
org.w3c.dom.Document content,
java.lang.String specVersion,
java.lang.String fragmentExp,
java.lang.String dialect)
Create a fragment resource on the server. |
static JAXBResource |
createJAXB(java.lang.String destination,
java.lang.String resourceURI,
long timeoutInMilliseconds,
java.lang.Object content,
java.lang.String specVersion,
java.lang.String... packageNames)
Creates a new resource instance on the server. |
static JAXBResource |
createJAXB(java.lang.String destination,
java.lang.String resourceURI,
long timeoutInMilliseconds,
java.lang.Object content,
java.lang.String specVersion,
com.sun.ws.management.xml.XmlBinding binding)
Creates a new resource instance on the server. |
static void |
delete(Resource res)
Delete the specified resource on the server. |
static Resource[] |
find(java.lang.String destination,
java.lang.String resourceURI,
long timeout,
java.util.Map<java.lang.String,java.lang.String> selectors)
Static method for locating existing exposed resource(s). |
static Resource[] |
find(java.lang.String destination,
java.lang.String resourceURI,
long timeout,
org.dmtf.schemas.wbem.wsman._1.wsman.SelectorSetType selectors)
Static method for locating existing exposed resource(s). |
static com.sun.ws.management.xml.XmlBinding |
getBinding()
Gets the XmlBinding that is used for marshaling and unmarshaling. |
static ServerIdentity |
getIdentity(java.lang.String destination)
Gets the server identity. |
static ServerIdentity |
getIdentity(java.lang.String destination,
int timeout)
Gets the server identity. |
static ServerIdentity |
getIdentity(java.lang.String destination,
int timeout,
java.util.Map.Entry<java.lang.String,java.lang.String>... headers)
Gets the server identity. |
static void |
setBinding(com.sun.ws.management.xml.XmlBinding binding)
Sets the XmlBinding that will be used for marshalling and unmarshalling. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String LATEST
Method Detail |
---|
public static Resource create(java.lang.String destination, java.lang.String resourceURI, long timeoutInMilliseconds, org.w3c.dom.Document content, java.lang.String specVersion) throws javax.xml.soap.SOAPException, javax.xml.bind.JAXBException, java.io.IOException, FaultException, javax.xml.datatype.DatatypeConfigurationException
destination
- A URL for the destination port of this service.resourceURI
- A resource URI indicating the type of resource to createtimeoutInMilliseconds
- Time to wait before giving up on creationcontent
- a w3c document representing the inital resource statespecVersion
- The wsman spec version of the client to create. You can
use null or the constant #LATEST.
javax.xml.soap.SOAPException
javax.xml.bind.JAXBException
java.io.IOException
FaultException
javax.xml.datatype.DatatypeConfigurationException
public static Resource create(java.lang.String destination, java.lang.String resourceURI, long timeoutInMilliseconds, org.w3c.dom.Document content, java.lang.String specVersion, java.util.HashSet<org.dmtf.schemas.wbem.wsman._1.wsman.OptionType> optionSet) throws javax.xml.soap.SOAPException, javax.xml.bind.JAXBException, java.io.IOException, FaultException, javax.xml.datatype.DatatypeConfigurationException
destination
- A URL for the destination port of this service.resourceURI
- A resource URI indicating the type of resource to createtimeoutInMilliseconds
- Time to wait before giving up on creationcontent
- a w3c document representing the inital resource statespecVersion
- The wsman spec version of the client to create. You can
use null or the constant #LATEST.optionSet
- set of user defined options to use during the create operation
javax.xml.soap.SOAPException
javax.xml.bind.JAXBException
java.io.IOException
FaultException
javax.xml.datatype.DatatypeConfigurationException
public static Resource createFragment(java.lang.String destination, java.lang.String resourceURI, org.dmtf.schemas.wbem.wsman._1.wsman.SelectorSetType existingResourceId, long timeoutInMilliseconds, org.w3c.dom.Document content, java.lang.String specVersion, java.lang.String fragmentExp, java.lang.String dialect) throws javax.xml.soap.SOAPException, javax.xml.bind.JAXBException, java.io.IOException, FaultException, javax.xml.datatype.DatatypeConfigurationException
destination
- A URL for the destination port of this service.resourceURI
- A resource URI indicating the type of resource to createexistingResourceId
- selector set identifying the resourcetimeoutInMilliseconds
- Time to wait before giving up on creationcontent
- a w3c Document representing the fragment to createspecVersion
- The wsman spec version of the client to create. You can
use null or the constant #LATEST.fragmentExp
- the fragment expressiondialect
- the fragment expression dialect
javax.xml.soap.SOAPException
javax.xml.bind.JAXBException
java.io.IOException
FaultException
javax.xml.datatype.DatatypeConfigurationException
public static Resource create(java.lang.String destination, java.lang.String resourceURI, org.dmtf.schemas.wbem.wsman._1.wsman.SelectorSetType existingResourceId, long timeoutInMilliseconds, java.lang.Object content, java.lang.String specVersion, java.util.HashSet<org.dmtf.schemas.wbem.wsman._1.wsman.OptionType> optionSet, java.lang.Object expression, java.util.Map<java.lang.String,java.lang.String> namespaces, java.lang.String dialect) throws javax.xml.soap.SOAPException, javax.xml.bind.JAXBException, java.io.IOException, FaultException, javax.xml.datatype.DatatypeConfigurationException
destination
- A URL for the destination port of this service.resourceURI
- A resource URI indicating the type of resource to createexistingResourceId
- selector set identifying the resource for fragment createtimeoutInMilliseconds
- Time to wait before giving up on creationcontent
- an object to be marshalled into the body of the request. If
expression is not null this is expected to be a Document or
DocumentFragment containing the XmlFragment to create,
otherwise it may be any object representing the resource
that can be marshalled into the document.specVersion
- The wsman spec version of the client to create. You can use
null or the constant #LATEST.optionSet
- set of user defined options to use during the create operationexpression
- a filter expression to be applied against the resource. 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
javax.xml.soap.SOAPException
javax.xml.bind.JAXBException
java.io.IOException
FaultException
javax.xml.datatype.DatatypeConfigurationException
public static void delete(Resource res) throws javax.xml.soap.SOAPException, javax.xml.bind.JAXBException, java.io.IOException, FaultException, javax.xml.datatype.DatatypeConfigurationException
res
- resource to delete.
javax.xml.soap.SOAPException
javax.xml.bind.JAXBException
java.io.IOException
FaultException
javax.xml.datatype.DatatypeConfigurationException
TransferableResource.delete()
public static Resource[] find(java.lang.String destination, java.lang.String resourceURI, long timeout, org.dmtf.schemas.wbem.wsman._1.wsman.SelectorSetType selectors) throws javax.xml.soap.SOAPException, javax.xml.bind.JAXBException, java.io.IOException, FaultException, javax.xml.datatype.DatatypeConfigurationException
EnumerableResource
or
TransferableResource
,
depending upon the desired operation.
destination
- URL of the target serviceresourceURI
- URI identifying the resourcetimeout
- the OperationTimeout
. This is the
maximum amount of time the client is willing to wait
for the operation to complete.selectors
- set of selectors used to identify a single
or subset of resources at the target service.
EnumerableResource
or
TransferableResource
,
depending upon the desired operation.
javax.xml.soap.SOAPException
javax.xml.bind.JAXBException
java.io.IOException
FaultException
javax.xml.datatype.DatatypeConfigurationException
public static Resource[] find(java.lang.String destination, java.lang.String resourceURI, long timeout, java.util.Map<java.lang.String,java.lang.String> selectors) throws javax.xml.soap.SOAPException, javax.xml.bind.JAXBException, java.io.IOException, FaultException, javax.xml.datatype.DatatypeConfigurationException
EnumerableResource
or
TransferableResource
,
depending upon the desired operation.
destination
- URL of the target serviceresourceURI
- URI identifying the resourcetimeout
- the OperationTimeout
. This is the
maximum amount of time the client is willing to wait
for the operation to complete.selectors
- set of selectors used to identify a single
or subset of resources at the target service.
EnumerableResource
or
TransferableResource
,
depending upon the desired operation.
javax.xml.soap.SOAPException
javax.xml.bind.JAXBException
java.io.IOException
FaultException
javax.xml.datatype.DatatypeConfigurationException
public static ServerIdentity getIdentity(java.lang.String destination) throws javax.xml.soap.SOAPException, java.io.IOException, javax.xml.bind.JAXBException
destination
- URL of the target service
ServerIdentity
javax.xml.soap.SOAPException
java.io.IOException
javax.xml.bind.JAXBException
ServerIdentity
public static ServerIdentity getIdentity(java.lang.String destination, int timeout) throws javax.xml.soap.SOAPException, java.io.IOException, javax.xml.bind.JAXBException, java.lang.InterruptedException, java.util.concurrent.TimeoutException
destination
- URL of the target servicetimeout
- the OperationTimeout
. This is the maximum
amount of time the client is willing to wait for the operation
to complete.
ServerIdentity
javax.xml.soap.SOAPException
java.io.IOException
javax.xml.bind.JAXBException
java.lang.InterruptedException
java.util.concurrent.TimeoutException
ServerIdentity
public static ServerIdentity getIdentity(java.lang.String destination, int timeout, java.util.Map.Entry<java.lang.String,java.lang.String>... headers) throws javax.xml.soap.SOAPException, java.io.IOException, javax.xml.bind.JAXBException, java.lang.InterruptedException, java.util.concurrent.TimeoutException
destination
- URL of the target servicetimeout
- the OperationTimeout
. This is the
maximum amount of time the client is willing to wait
for the operation to complete.headers
- additional SOAP headers to set on the request
ServerIdentity
javax.xml.soap.SOAPException
java.io.IOException
javax.xml.bind.JAXBException
java.lang.InterruptedException
java.util.concurrent.TimeoutException
ServerIdentity
public static void setBinding(com.sun.ws.management.xml.XmlBinding binding)
binding
- public static com.sun.ws.management.xml.XmlBinding getBinding()
public static JAXBResource createJAXB(java.lang.String destination, java.lang.String resourceURI, long timeoutInMilliseconds, java.lang.Object content, java.lang.String specVersion, com.sun.ws.management.xml.XmlBinding binding) throws javax.xml.soap.SOAPException, javax.xml.bind.JAXBException, java.io.IOException, FaultException, javax.xml.datatype.DatatypeConfigurationException
destination
- A URL for the destination port of this service.resourceURI
- A resource URI indicating the type of resource to createtimeoutInMilliseconds
- Time to wait before giving up on creationcontent
- object to be marshaled into the SOAP document that represents
the resource to be created.specVersion
- The wsman spec version of the client to create. You can
use null or the constant #LATEST.binding
- XmlBinding
to use to marshal and unmarshal the SOAP documents
sent over the wire.
javax.xml.soap.SOAPException
javax.xml.bind.JAXBException
java.io.IOException
FaultException
javax.xml.datatype.DatatypeConfigurationException
public static JAXBResource createJAXB(java.lang.String destination, java.lang.String resourceURI, long timeoutInMilliseconds, java.lang.Object content, java.lang.String specVersion, java.lang.String... packageNames) throws javax.xml.soap.SOAPException, javax.xml.bind.JAXBException, java.io.IOException, FaultException, javax.xml.datatype.DatatypeConfigurationException
destination
- A URL for the destination port of this service.resourceURI
- A resource URI indicating the type of resource to createtimeoutInMilliseconds
- Time to wait before giving up on creationcontent
- object to be marshaled into the SOAP document that represents
the resource to be created.specVersion
- The wsman spec version of the client to create. You can
use null or the constant #LATEST.packageNames
- names of packages to be used to construct an
XmlBinding
object that will be used to marshal
the resource into the SOAP document. NOTE: For performance reasons
it is highly recommended to use
createJAXB(String, String, long, Object, String, XmlBinding)
instead of this method and reuse the XmlBinding
object.
javax.xml.soap.SOAPException
javax.xml.bind.JAXBException
java.io.IOException
FaultException
javax.xml.datatype.DatatypeConfigurationException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |