@Test public void testWithConnectionEndpointContext() { assertThat(matcher.isToBeSent(messageContext, connectionContext), is(true)); assertThat(matcher.isToBeSent(differentMessageContext, connectionContext), is(false)); assertThat(matcher.isToBeSent(unsecureMessageContext, connectionContext), is(true)); }
@Override public boolean isToBeSent(EndpointContext messageContext, EndpointContext connectorContext) { if (null == connectorContext) { return true; } return internalMatch(messageContext, connectorContext); }
PrincipalEndpointContextMatcher implements EndpointContextMatcher { @Override public boolean isToBeSent(EndpointContext messageContext, EndpointContext connectorContext) { if (null == connectorContext) { return true; } return internalMatch(messageContext, connectorContext); } }
PrincipalEndpointContextMatcher implements EndpointContextMatcher { @Override public boolean isToBeSent(EndpointContext messageContext, EndpointContext connectorContext) { if (null == connectorContext) { return true; } return internalMatch(messageContext, connectorContext); } PrincipalEndpointContextMatcher();  PrincipalEndpointContextMatcher(boolean usePrincipalAsIdentity); }
PrincipalEndpointContextMatcher implements EndpointContextMatcher { @Override public boolean isToBeSent(EndpointContext messageContext, EndpointContext connectorContext) { if (null == connectorContext) { return true; } return internalMatch(messageContext, connectorContext); } PrincipalEndpointContextMatcher();  PrincipalEndpointContextMatcher(boolean usePrincipalAsIdentity); @Override String getName(); @Override Object getEndpointIdentity(EndpointContext context); @Override boolean isResponseRelatedToRequest(EndpointContext requestContext, EndpointContext responseContext); @Override boolean isToBeSent(EndpointContext messageContext, EndpointContext connectorContext); @Override String toRelevantState(EndpointContext context); }
PrincipalEndpointContextMatcher implements EndpointContextMatcher { @Override public boolean isToBeSent(EndpointContext messageContext, EndpointContext connectorContext) { if (null == connectorContext) { return true; } return internalMatch(messageContext, connectorContext); } PrincipalEndpointContextMatcher();  PrincipalEndpointContextMatcher(boolean usePrincipalAsIdentity); @Override String getName(); @Override Object getEndpointIdentity(EndpointContext context); @Override boolean isResponseRelatedToRequest(EndpointContext requestContext, EndpointContext responseContext); @Override boolean isToBeSent(EndpointContext messageContext, EndpointContext connectorContext); @Override String toRelevantState(EndpointContext context);  }