本文整理匯總了Java中org.apache.cxf.phase.Phase類的典型用法代碼示例。如果您正苦於以下問題:Java Phase類的具體用法?Java Phase怎麽用?Java Phase使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
Phase類屬於org.apache.cxf.phase包,在下文中一共展示了Phase類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: SpringAuthenticationInjectorInterceptor
import org.apache.cxf.phase.Phase; //導入依賴的package包/類
public SpringAuthenticationInjectorInterceptor(UserProfileService userDetailsService,
SecurityEnforcer securityEnforcer, SecurityHelper securityHelper, ActivationComputer activationComputer) {
super();
this.userDetailsService = userDetailsService;
this.securityEnforcer = securityEnforcer;
this.securityHelper = securityHelper;
this.activationComputer = activationComputer;
id = getClass().getName();
phase = Phase.PRE_PROTOCOL;
getAfter().add(WSS4JInInterceptor.class.getName());
}
示例2: testCustomerService
import org.apache.cxf.phase.Phase; //導入依賴的package包/類
@Test
public void testCustomerService() throws Exception {
ClassPathXmlApplicationContext serverContext = null;
ClassPathXmlApplicationContext clientContext = null;
try {
serverContext = new ClassPathXmlApplicationContext(
new String[] {"spring-config/server-applicationContext.xml"});
Object server = serverContext.getBean("org.apache.camel.itest.customerrelations.CustomerServiceV1");
assertNotNull("We should get server here", server);
// add an interceptor to verify headers
EndpointImpl.class.cast(server).getServer().getEndpoint().getInInterceptors()
.add(new HeaderChecker(Phase.READ));
clientContext = new ClassPathXmlApplicationContext(
new String[] {"spring-config/client-applicationContext.xml"});
CustomerServiceV1 customerService = clientContext.getBean("org.apache.camel.itest.customerrelations.CustomerServiceV1", CustomerServiceV1.class);
// CXF 2.1.2 only apply the SOAPAction for the request message (in SoapPreProtocolOutInterceptor)
// After went through the SOAP 1.1 specification, I got that the SOAPAction is only for the request message
// So I comment out this HeaderChecker Interceptor setting up code
/*JaxWsClientProxy.class.cast(Proxy.getInvocationHandler(customerService))
.getClient().getInInterceptors().add(new HeaderChecker(Phase.READ));*/
Customer customer = customerService.getCustomer("12345");
assertNotNull("We should get Customer here", customer);
} finally {
// we're done so let's properly close the application contexts
IOHelper.close(clientContext, serverContext);
}
}
示例3: ValidationInterceptor
import org.apache.cxf.phase.Phase; //導入依賴的package包/類
public ValidationInterceptor() {
super(Phase.PRE_INVOKE);
ValidatorFactory defaultFactory = Validation.buildDefaultValidatorFactory();
validator = defaultFactory.getValidator();
if (validator == null) {
log.warn("Bean Validation provider could not be found, no validation will be performed");
} else {
log.debug("Validation In-Interceptor initialized successfully");
}
}
示例4: customizeEndpoint
import org.apache.cxf.phase.Phase; //導入依賴的package包/類
@Override
public void customizeEndpoint(Endpoint endpoint) {
EndpointImpl e = (EndpointImpl) endpoint;
e.getServer().getEndpoint().getInInterceptors().add(new TimingBeforeInterceptor(Phase.RECEIVE));
e.getServer().getEndpoint().getOutInterceptors().add(new TimingAfterInterceptor(Phase.SEND, metricRegistry));
}
示例5: HandlerChainSortInterceptor
import org.apache.cxf.phase.Phase; //導入依賴的package包/類
public HandlerChainSortInterceptor(Binding b)
{
super(Phase.PRE_PROTOCOL);
binding = b;
//initially sort and reset the handler chain; if the chain is not modified later, the sort process
//in handleMessage() deals with an already ordered list and is very efficient (~ O(n) according to
//Collections.sort(..) javadoc.
@SuppressWarnings("rawtypes")
List<Handler> hc = binding.getHandlerChain();
if (hc.size() > 1) { //no need to sort etc if the chain is empty or has one handler only
Collections.sort(hc, comparator);
binding.setHandlerChain(hc);
}
}
示例6: NsCtxSelectorStoreInterceptor
import org.apache.cxf.phase.Phase; //導入依賴的package包/類
public NsCtxSelectorStoreInterceptor()
{
super(Phase.PRE_LOGICAL);
addBefore(OneWayProcessorInterceptor.class.getName());
ClassLoader cl = ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader();
factory = (NamespaceContextSelectorWrapperFactory) ServiceLoader.loadService(
NamespaceContextSelectorWrapperFactory.class.getName(), null, cl);
}
示例7: JaspiSeverInInterceptor
import org.apache.cxf.phase.Phase; //導入依賴的package包/類
public JaspiSeverInInterceptor(JaspiServerAuthenticator authManager)
{
super(Phase.PRE_PROTOCOL);
addAfter(SAAJInInterceptor.class.getName());
addBefore("org.jboss.wsf.stack.cxf.security.authentication.JaspiSubjectCreatingInterceptor");
this.authManager = authManager;
}
示例8: EbMSSecSignatureInInterceptor
import org.apache.cxf.phase.Phase; //導入依賴的package包/類
public EbMSSecSignatureInInterceptor()
{
super(Phase.POST_STREAM);
addAfter(StaxInInterceptor.class.getName());
//FIXME move to mule init bean???
org.apache.xml.security.Init.init();
}
示例9: XMLSecSignatureInInterceptor
import org.apache.cxf.phase.Phase; //導入依賴的package包/類
public XMLSecSignatureInInterceptor()
{
super(Phase.POST_STREAM);
addAfter(StaxInInterceptor.class.getName());
//FIXME move to mule init bean???
org.apache.xml.security.Init.init();
}
示例10: XMLSecSignatureOutInterceptor
import org.apache.cxf.phase.Phase; //導入依賴的package包/類
public XMLSecSignatureOutInterceptor()
{
this(Phase.WRITE);
addBefore(SoapOutInterceptor.class.getName());
//super(Phase.PRE_STREAM);
//addAfter(StaxOutInterceptor.class.getName());
//FIXME move to mule init bean???
org.apache.xml.security.Init.init();
}
示例11: XMLSecSignatureOutEndingInterceptor
import org.apache.cxf.phase.Phase; //導入依賴的package包/類
public XMLSecSignatureOutEndingInterceptor()
{
this(XMLSecSignatureOutEndingInterceptor.class.getName(),Phase.WRITE_ENDING);
addAfter(SoapOutInterceptor.SoapOutEndingInterceptor.class.getName());
//super(XMLsecSignatureOutEndingInterceptor.class.getName(),Phase.PRE_STREAM_ENDING);
//addBefore(StaxOutInterceptor.StaxOutEndingInterceptor.class.getName());
}
示例12: EbMSSecSignatureOutInterceptor
import org.apache.cxf.phase.Phase; //導入依賴的package包/類
public EbMSSecSignatureOutInterceptor()
{
this(Phase.WRITE);
addBefore(SoapOutInterceptor.class.getName());
//super(Phase.PRE_STREAM);
//addAfter(StaxOutInterceptor.class.getName());
//FIXME move to mule init bean???
org.apache.xml.security.Init.init();
}
示例13: XMLDSignatureOutInterceptor
import org.apache.cxf.phase.Phase; //導入依賴的package包/類
public XMLDSignatureOutInterceptor()
{
super(Phase.WRITE);
addBefore(SoapOutInterceptor.class.getName());
//super(Phase.PRE_STREAM);
//addAfter(StaxOutInterceptor.class.getName());
}
示例14: XMLDSignatureOutEndingInterceptor
import org.apache.cxf.phase.Phase; //導入依賴的package包/類
public XMLDSignatureOutEndingInterceptor()
{
super(XMLDSignatureOutEndingInterceptor.class.getName(),Phase.WRITE_ENDING);
addAfter(SoapOutInterceptor.SoapOutEndingInterceptor.class.getName());
//super(XMLDSignatureOutEndingInterceptor.class.getName(),Phase.PRE_STREAM_ENDING);
//addBefore(StaxOutInterceptor.StaxOutEndingInterceptor.class.getName());
}
示例15: SpringAuthenticationInjectorInterceptor
import org.apache.cxf.phase.Phase; //導入依賴的package包/類
public SpringAuthenticationInjectorInterceptor(UserProfileService userDetailsService,
SecurityEnforcer securityEnforcer, SecurityHelper securityHelper, ActivationComputer activationComputer,
TaskManager taskManager) {
super();
this.userDetailsService = userDetailsService;
this.securityEnforcer = securityEnforcer;
this.securityHelper = securityHelper;
this.activationComputer = activationComputer;
this.taskManager = taskManager;
id = getClass().getName();
phase = Phase.PRE_PROTOCOL;
getAfter().add(WSS4JInInterceptor.class.getName());
}