public class TransportManagerHelper extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_RESPONSE_WORKMANAGER
the name of the work manager that is used by default to dispatch work in response path of OSB message flow
|
Modifier and Type | Method and Description |
---|---|
static boolean |
clusterExists() |
static String |
getCluster() |
static Set<String> |
getDispatchPolicies()
Returns the set of dispatch policies available on the server.
|
static Set<String> |
getDispatchPolicies(JMXConnector connector) |
static DomainRuntimeServiceMBean |
getDomainRuntimeService(JMXConnector connector) |
static Set<String> |
getRuntimeServerNames() |
static ServiceInfo |
getServiceInfo(Ref ref) |
static KeyPairCredential |
getSSLClientKeyPair(TransportProvider provider, Ref skp)
Returns a key-pair (private key and certificate chain) for SSL client authentication stored on the given service key provider
|
static TransportManager |
getTransportManager() |
static UsernamePassword |
getUsernamePassword(TransportProvider provider, Ref serviceAccount) |
static WsdlDescription |
getWsdlDescription(Ref ref) |
static XmlDescription |
getXmlDescription(Ref ref) |
static boolean |
hasSSLClientKeyPair(TransportProvider provider, Ref skp) |
static boolean |
isAdmin() |
static boolean |
isOffline() |
static boolean |
isRuntimeEnabled() |
static boolean |
isStaticServiceAccount(Ref serviceAccount) |
static void |
schedule(Runnable runnable, String dispatchPolicy)
Schedule a work instance for execution in another thread associated with specified dispatch policy.
|
static void |
schedule(Runnable runnable, String dispatchPolicy, String appName, String moduleName)
Schedule a work instance for execution in another thread associated with specified dispatch policy.
|
static List<Ref> |
searchInstanceIds(String typeId, String keyName, Object keyValue)
Returns a list of references for instances that has the given keyValue for the given key.
|
public static final String DEFAULT_RESPONSE_WORKMANAGER
public static TransportManager getTransportManager() throws TransportException
TransportException
- a exception occurredpublic static boolean isAdmin()
IllegalStateException
- if the caller is offline.public static boolean clusterExists()
public static boolean isRuntimeEnabled()
public static boolean isOffline()
public static Set<String> getRuntimeServerNames()
UnsupportedOperationException
- if this is called in offline mode.public static String getCluster()
public static UsernamePassword getUsernamePassword(TransportProvider provider, Ref serviceAccount) throws CredentialNotFoundException
provider
- transport providerserviceAccount
- a reference to a service accountCredentialNotFoundException
- if the service account does not exist or if a username/password has not been assigned to the service accountpublic static boolean isStaticServiceAccount(Ref serviceAccount) throws TransportException
serviceAccount
- a service account referenceTransportException
- if there is no service account for the given referencepublic static KeyPairCredential getSSLClientKeyPair(TransportProvider provider, Ref skp) throws CredentialNotFoundException
provider
- the transport provider requesting the key-pairskp
- a reference to a service key providerCredentialNotFoundException
- if the service key provider does not exist or does not have a key-pair for SSL client authenticationpublic static boolean hasSSLClientKeyPair(TransportProvider provider, Ref skp) throws TransportException
provider
- the transport provider requesting the key-pairskp
- a reference to a service key providerTransportException
- if the service key provider does not existpublic static ServiceInfo getServiceInfo(Ref ref) throws TransportException
ref
- service referenceTransportException
- if an exception occurspublic static List<Ref> searchInstanceIds(String typeId, String keyName, Object keyValue) throws TransportException
typeId
- the resource typekeyName
- can be one of the defined type ids, e.g. Refs.PROXY_REF. Also see Refs
keyValue
- can be one of the defined queries, e.g. ProxyServiceQuery.KEY_PROXYURI. Also see ProxyServiceQuery
and BusinessServiceQuery
TransportException
- if an exception occurspublic static void schedule(Runnable runnable, String dispatchPolicy) throws TransportException
schedule(Runnable, String, String, String)
instead to specify the application name to associate the work manager with.runnable
- action to execute asynchronouslydispatchPolicy
- name of the WLS WorkManager which will be used to execute the Runnable.run action. Maybe null, in which case the default work manager will be used.TransportException
- if an exception occurspublic static void schedule(Runnable runnable, String dispatchPolicy, String appName, String moduleName) throws TransportException
runnable
- scheduled workdispatchPolicy
- work manager nameappName
- application name to associated work manager with. If null, then it is infered from the current application context.moduleName
- module name to associated work manager with. If null, then it is infered from the current application context.TransportException
- if an exception occurs.public static Set<String> getDispatchPolicies() throws TransportException
getDispatchPolicies(JMXConnector connector)
if you for transports implementation that supports offline mode.TransportException
- if the caller of this method is offline.public static Set<String> getDispatchPolicies(JMXConnector connector) throws TransportException
connector
- the JMXConnector instance used to access the domain.TransportException
- if an exception occurspublic static DomainRuntimeServiceMBean getDomainRuntimeService(JMXConnector connector) throws TransportException
TransportException
public static WsdlDescription getWsdlDescription(Ref ref) throws TransportException
ref
- the wsdl refTransportException
- if an exception occurspublic static XmlDescription getXmlDescription(Ref ref) throws TransportException
ref
- the schema refTransportException
- if an exception occurs