org.apache.servicemix.validation
Class ValidationEndpoint

java.lang.Object
  extended by org.apache.servicemix.common.endpoints.AbstractEndpoint
      extended by org.apache.servicemix.common.endpoints.SimpleEndpoint
          extended by org.apache.servicemix.common.endpoints.ProviderEndpoint
              extended by org.apache.servicemix.validation.ValidationEndpoint
All Implemented Interfaces:
org.apache.servicemix.common.Endpoint, ValidationEndpointType

public class ValidationEndpoint
extends org.apache.servicemix.common.endpoints.ProviderEndpoint
implements ValidationEndpointType

Author:
lhein

Field Summary
static String FAULT_FLOW
           
static String FAULT_JBI
           
static String TAG_ERROR_END
           
static String TAG_ERROR_START
           
static String TAG_FATAL_END
           
static String TAG_FATAL_START
           
static String TAG_RESULT_END
           
static String TAG_RESULT_START
           
static String TAG_WARNING_END
           
static String TAG_WARNING_START
           
 
Fields inherited from class org.apache.servicemix.common.endpoints.AbstractEndpoint
definition, description, endpoint, interfaceName, logger, service, serviceUnit
 
Constructor Summary
ValidationEndpoint()
           
 
Method Summary
protected  void done(javax.jbi.messaging.MessageExchange messageExchange)
           
protected  void doValidation(Validator validator, DOMSource src, DOMResult result)
          does the validation
protected  void fail(javax.jbi.messaging.MessageExchange messageExchange, Exception e)
           
 MessageAwareErrorHandlerFactory getErrorHandlerFactory()
           
 String getHandlingErrorMethod()
           
 Schema getSchema()
           
 String getSchemaLanguage()
           
 org.springframework.core.io.Resource getSchemaResource()
           
 Source getSchemaSource()
           
protected  void processInOnly(javax.jbi.messaging.MessageExchange exchange, javax.jbi.messaging.NormalizedMessage in)
           
protected  void processInOut(javax.jbi.messaging.MessageExchange exchange, javax.jbi.messaging.NormalizedMessage in, javax.jbi.messaging.NormalizedMessage out)
           
protected  void send(javax.jbi.messaging.MessageExchange messageExchange)
           
protected  void sendSync(javax.jbi.messaging.MessageExchange messageExchange)
           
 void setErrorHandlerFactory(MessageAwareErrorHandlerFactory errorHandlerFactory)
           
 void setHandlingErrorMethod(String handlingErrorMethod)
           
 void setSchema(Schema schema)
           
 void setSchemaLanguage(String schemaLanguage)
           
 void setSchemaResource(org.springframework.core.io.Resource schemaResource)
           
 void setSchemaSource(Source schemaSource)
           
 void start()
           
 void startValidation(javax.jbi.messaging.MessageExchange exchange, javax.jbi.messaging.NormalizedMessage in, javax.jbi.messaging.NormalizedMessage out, javax.jbi.messaging.Fault fault)
          does the validation
 void stop()
           
 
Methods inherited from class org.apache.servicemix.common.endpoints.ProviderEndpoint
activate, deactivate, getRole, process
 
Methods inherited from class org.apache.servicemix.common.endpoints.SimpleEndpoint
getChannel, getContext, getExchangeFactory
 
Methods inherited from class org.apache.servicemix.common.endpoints.AbstractEndpoint
getDefinition, getDescription, getEndpoint, getInterfaceName, getKey, getService, getServiceUnit, isExchangeOkay, prepareExchange, setDefinition, setDescription, setEndpoint, setInterfaceName, setService, setServiceUnit, toString, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FAULT_FLOW

public static final String FAULT_FLOW
See Also:
Constant Field Values

FAULT_JBI

public static final String FAULT_JBI
See Also:
Constant Field Values

TAG_RESULT_START

public static final String TAG_RESULT_START
See Also:
Constant Field Values

TAG_RESULT_END

public static final String TAG_RESULT_END
See Also:
Constant Field Values

TAG_WARNING_START

public static final String TAG_WARNING_START
See Also:
Constant Field Values

TAG_WARNING_END

public static final String TAG_WARNING_END
See Also:
Constant Field Values

TAG_ERROR_START

public static final String TAG_ERROR_START
See Also:
Constant Field Values

TAG_ERROR_END

public static final String TAG_ERROR_END
See Also:
Constant Field Values

TAG_FATAL_START

public static final String TAG_FATAL_START
See Also:
Constant Field Values

TAG_FATAL_END

public static final String TAG_FATAL_END
See Also:
Constant Field Values
Constructor Detail

ValidationEndpoint

public ValidationEndpoint()
Method Detail

start

public void start()
           throws Exception
Specified by:
start in interface org.apache.servicemix.common.Endpoint
Overrides:
start in class org.apache.servicemix.common.endpoints.SimpleEndpoint
Throws:
Exception

stop

public void stop()
          throws Exception
Specified by:
stop in interface org.apache.servicemix.common.Endpoint
Overrides:
stop in class org.apache.servicemix.common.endpoints.SimpleEndpoint
Throws:
Exception

processInOnly

protected void processInOnly(javax.jbi.messaging.MessageExchange exchange,
                             javax.jbi.messaging.NormalizedMessage in)
                      throws Exception
Overrides:
processInOnly in class org.apache.servicemix.common.endpoints.ProviderEndpoint
Throws:
Exception

processInOut

protected void processInOut(javax.jbi.messaging.MessageExchange exchange,
                            javax.jbi.messaging.NormalizedMessage in,
                            javax.jbi.messaging.NormalizedMessage out)
                     throws Exception
Overrides:
processInOut in class org.apache.servicemix.common.endpoints.ProviderEndpoint
Throws:
Exception

startValidation

public void startValidation(javax.jbi.messaging.MessageExchange exchange,
                            javax.jbi.messaging.NormalizedMessage in,
                            javax.jbi.messaging.NormalizedMessage out,
                            javax.jbi.messaging.Fault fault)
                     throws Exception
does the validation

Parameters:
exchange -
in -
out -
fault -
Throws:
Exception

doValidation

protected void doValidation(Validator validator,
                            DOMSource src,
                            DOMResult result)
                     throws SAXException,
                            IOException
does the validation

Parameters:
validator -
src -
result -
Throws:
SAXException
IOException

fail

protected void fail(javax.jbi.messaging.MessageExchange messageExchange,
                    Exception e)
             throws javax.jbi.messaging.MessagingException
Overrides:
fail in class org.apache.servicemix.common.endpoints.SimpleEndpoint
Throws:
javax.jbi.messaging.MessagingException

send

protected void send(javax.jbi.messaging.MessageExchange messageExchange)
             throws javax.jbi.messaging.MessagingException
Overrides:
send in class org.apache.servicemix.common.endpoints.SimpleEndpoint
Throws:
javax.jbi.messaging.MessagingException

sendSync

protected void sendSync(javax.jbi.messaging.MessageExchange messageExchange)
                 throws javax.jbi.messaging.MessagingException
Overrides:
sendSync in class org.apache.servicemix.common.endpoints.SimpleEndpoint
Throws:
javax.jbi.messaging.MessagingException

done

protected void done(javax.jbi.messaging.MessageExchange messageExchange)
             throws javax.jbi.messaging.MessagingException
Overrides:
done in class org.apache.servicemix.common.endpoints.SimpleEndpoint
Throws:
javax.jbi.messaging.MessagingException

getHandlingErrorMethod

public String getHandlingErrorMethod()

setHandlingErrorMethod

public void setHandlingErrorMethod(String handlingErrorMethod)

getSchema

public Schema getSchema()

setSchema

public void setSchema(Schema schema)

getSchemaLanguage

public String getSchemaLanguage()

setSchemaLanguage

public void setSchemaLanguage(String schemaLanguage)

getSchemaSource

public Source getSchemaSource()

setSchemaSource

public void setSchemaSource(Source schemaSource)

getSchemaResource

public org.springframework.core.io.Resource getSchemaResource()

setSchemaResource

public void setSchemaResource(org.springframework.core.io.Resource schemaResource)

getErrorHandlerFactory

public MessageAwareErrorHandlerFactory getErrorHandlerFactory()

setErrorHandlerFactory

public void setErrorHandlerFactory(MessageAwareErrorHandlerFactory errorHandlerFactory)


Copyright © 2005-2009 The Apache Software Foundation. All Rights Reserved.