Class MiloServerComponent
- java.lang.Object
-
- org.apache.camel.support.service.BaseService
-
- org.apache.camel.support.service.ServiceSupport
-
- org.apache.camel.support.DefaultComponent
-
- org.apache.camel.component.milo.server.MiloServerComponent
-
- All Implemented Interfaces:
AutoCloseable
,org.apache.camel.CamelContextAware
,org.apache.camel.Component
,org.apache.camel.Service
,org.apache.camel.ShutdownableService
,org.apache.camel.StatefulService
,org.apache.camel.SuspendableService
@Component("milo-server") public class MiloServerComponent extends org.apache.camel.support.DefaultComponent
OPC UA Server based component
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_NAMESPACE_URI
-
Constructor Summary
Constructors Constructor Description MiloServerComponent()
MiloServerComponent(org.eclipse.milo.opcua.sdk.server.api.config.OpcUaServerConfig serverConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.apache.camel.Endpoint
createEndpoint(String uri, String remaining, Map<String,Object> parameters)
protected void
doStart()
protected void
doStop()
String
getApplicationName()
String
getApplicationUri()
List<String>
getBindAddresses()
org.eclipse.milo.opcua.stack.core.types.structured.BuildInfo
getBuildInfo()
X509Certificate
getCertificate()
org.eclipse.milo.opcua.stack.core.security.CertificateManager
getCertificateManager()
org.eclipse.milo.opcua.stack.core.security.CertificateValidator
getCertificateValidator()
String
getDefaultCertificateValidator()
CamelNamespace
getNamespace()
String
getNamespaceUri()
String
getPath()
int
getPort()
String
getProductUri()
Set<org.eclipse.milo.opcua.stack.core.security.SecurityPolicy>
getSecurityPolicies()
String
getSecurityPoliciesById()
org.eclipse.milo.opcua.sdk.server.OpcUaServer
getServer()
String
getUserAuthenticationCredentials()
String
getUsernameSecurityPolicyUri()
Boolean
isEnableAnonymousAuthentication()
void
loadServerCertificate(KeyPair keyPair, X509Certificate certificate)
Server certificatevoid
loadServerCertificate(KeyStoreLoader.Result result)
Server certificatevoid
setApplicationName(String applicationName)
The application namevoid
setApplicationUri(String applicationUri)
The application URIvoid
setBindAddresses(String bindAddresses)
Set the addresses of the local addresses the server should bind tovoid
setBuildInfo(org.eclipse.milo.opcua.stack.core.types.structured.BuildInfo buildInfo)
Server build infovoid
setCertificate(X509Certificate certificate)
Server certificatevoid
setCertificateManager(org.eclipse.milo.opcua.stack.core.security.CertificateManager certificateManager)
Server certificate managervoid
setCertificateValidator(org.eclipse.milo.opcua.stack.core.security.CertificateValidator certificateValidator)
Validator for client certificatesvoid
setDefaultCertificateValidator(String defaultCertificateValidator)
Validator for client certificates using default file based approachvoid
setEnableAnonymousAuthentication(boolean enableAnonymousAuthentication)
Enable anonymous authentication, disabled by defaultvoid
setNamespaceUri(String namespaceUri)
The URI of the namespace, defaults tourn:org:apache:camel
void
setPath(String path)
The path to be appended to the end of the endpoint url.void
setPort(int port)
The TCP port the server binds tovoid
setProductUri(String productUri)
The product URIvoid
setSecurityPolicies(Set<org.eclipse.milo.opcua.stack.core.security.SecurityPolicy> securityPolicies)
Security policiesvoid
setSecurityPoliciesById(String securityPoliciesById)
Security policies by URI or name.void
setUserAuthenticationCredentials(String userAuthenticationCredentials)
Set user password combinations in the form of "user1:pwd1,user2:pwd2" Usernames and passwords will be URL decodedvoid
setUsernameSecurityPolicyUri(String usernameSecurityPolicyUri)
Set theUserTokenPolicy
used whenvoid
setUsernameSecurityPolicyUri(org.eclipse.milo.opcua.stack.core.security.SecurityPolicy usernameSecurityPolicy)
Set theUserTokenPolicy
used when-
Methods inherited from class org.apache.camel.support.DefaultComponent
afterConfiguration, createEndpoint, createEndpoint, doBuild, getAndRemoveOrResolveReferenceParameter, getAndRemoveOrResolveReferenceParameter, getAndRemoveParameter, getAndRemoveParameter, getCamelContext, getComponentPropertyConfigurer, getEndpointPropertyConfigurer, getExtension, getSupportedExtensions, ifStartsWithReturnRemainder, isBasicPropertyBinding, isBridgeErrorHandler, isLazyStartProducer, registerExtension, registerExtension, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceParameter, resolveAndRemoveReferenceParameter, setBasicPropertyBinding, setBridgeErrorHandler, setCamelContext, setLazyStartProducer, setProperties, setProperties, setProperties, useIntrospectionOnEndpoint, useRawUri, validateParameters, validateURI
-
Methods inherited from class org.apache.camel.support.service.BaseService
build, doFail, doInit, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Field Detail
-
DEFAULT_NAMESPACE_URI
public static final String DEFAULT_NAMESPACE_URI
- See Also:
- Constant Field Values
-
-
Method Detail
-
getNamespace
public CamelNamespace getNamespace()
-
doStart
protected void doStart() throws Exception
- Overrides:
doStart
in classorg.apache.camel.support.DefaultComponent
- Throws:
Exception
-
doStop
protected void doStop() throws Exception
- Overrides:
doStop
in classorg.apache.camel.support.DefaultComponent
- Throws:
Exception
-
createEndpoint
protected org.apache.camel.Endpoint createEndpoint(String uri, String remaining, Map<String,Object> parameters) throws Exception
- Specified by:
createEndpoint
in classorg.apache.camel.support.DefaultComponent
- Throws:
Exception
-
loadServerCertificate
public void loadServerCertificate(KeyStoreLoader.Result result)
Server certificate
-
loadServerCertificate
public void loadServerCertificate(KeyPair keyPair, X509Certificate certificate)
Server certificate
-
setCertificate
public void setCertificate(X509Certificate certificate)
Server certificate
-
setNamespaceUri
public void setNamespaceUri(String namespaceUri)
The URI of the namespace, defaults tourn:org:apache:camel
-
setApplicationName
public void setApplicationName(String applicationName)
The application name
-
setPath
public void setPath(String path)
The path to be appended to the end of the endpoint url. (doesn't need to start with '/')
-
setApplicationUri
public void setApplicationUri(String applicationUri)
The application URI
-
setProductUri
public void setProductUri(String productUri)
The product URI
-
setPort
public void setPort(int port)
The TCP port the server binds to
-
setSecurityPolicies
public void setSecurityPolicies(Set<org.eclipse.milo.opcua.stack.core.security.SecurityPolicy> securityPolicies)
Security policies
-
setSecurityPoliciesById
public void setSecurityPoliciesById(String securityPoliciesById)
Security policies by URI or name. Multiple policies can be separated by comma.
-
getSecurityPoliciesById
public String getSecurityPoliciesById()
-
setUserAuthenticationCredentials
public void setUserAuthenticationCredentials(String userAuthenticationCredentials)
Set user password combinations in the form of "user1:pwd1,user2:pwd2" Usernames and passwords will be URL decoded
-
getUserAuthenticationCredentials
public String getUserAuthenticationCredentials()
-
setEnableAnonymousAuthentication
public void setEnableAnonymousAuthentication(boolean enableAnonymousAuthentication)
Enable anonymous authentication, disabled by default
-
setUsernameSecurityPolicyUri
public void setUsernameSecurityPolicyUri(org.eclipse.milo.opcua.stack.core.security.SecurityPolicy usernameSecurityPolicy)
Set theUserTokenPolicy
used when
-
setUsernameSecurityPolicyUri
public void setUsernameSecurityPolicyUri(String usernameSecurityPolicyUri)
Set theUserTokenPolicy
used when
-
setBindAddresses
public void setBindAddresses(String bindAddresses)
Set the addresses of the local addresses the server should bind to
-
setBuildInfo
public void setBuildInfo(org.eclipse.milo.opcua.stack.core.types.structured.BuildInfo buildInfo)
Server build info
-
setCertificateManager
public void setCertificateManager(org.eclipse.milo.opcua.stack.core.security.CertificateManager certificateManager)
Server certificate manager
-
setCertificateValidator
public void setCertificateValidator(org.eclipse.milo.opcua.stack.core.security.CertificateValidator certificateValidator)
Validator for client certificates
-
setDefaultCertificateValidator
public void setDefaultCertificateValidator(String defaultCertificateValidator)
Validator for client certificates using default file based approach
-
getDefaultCertificateValidator
public String getDefaultCertificateValidator()
-
getPort
public int getPort()
-
getNamespaceUri
public String getNamespaceUri()
-
getServer
public org.eclipse.milo.opcua.sdk.server.OpcUaServer getServer()
-
isEnableAnonymousAuthentication
public Boolean isEnableAnonymousAuthentication()
-
getCertificateManager
public org.eclipse.milo.opcua.stack.core.security.CertificateManager getCertificateManager()
-
getSecurityPolicies
public Set<org.eclipse.milo.opcua.stack.core.security.SecurityPolicy> getSecurityPolicies()
-
getUsernameSecurityPolicyUri
public String getUsernameSecurityPolicyUri()
-
getCertificateValidator
public org.eclipse.milo.opcua.stack.core.security.CertificateValidator getCertificateValidator()
-
getCertificate
public X509Certificate getCertificate()
-
getProductUri
public String getProductUri()
-
getApplicationUri
public String getApplicationUri()
-
getApplicationName
public String getApplicationName()
-
getPath
public String getPath()
-
getBuildInfo
public org.eclipse.milo.opcua.stack.core.types.structured.BuildInfo getBuildInfo()
-
-