Codota Logo
SimpMessageTypeMatcher.<init>
Code IndexAdd Codota to your IDE (free)

How to use
org.springframework.security.messaging.util.matcher.SimpMessageTypeMatcher
constructor

Best Java code snippets using org.springframework.security.messaging.util.matcher.SimpMessageTypeMatcher.<init> (Showing top 8 results out of 315)

  • Common ways to obtain SimpMessageTypeMatcher
private void myMethod () {
SimpMessageTypeMatcher s =
  • Codota IconSimpMessageType typeToMatch;new SimpMessageTypeMatcher(typeToMatch)
  • Smart code suggestions by Codota
}
origin: spring-projects/spring-security

/**
 * Maps a {@link List} of {@link SimpDestinationMessageMatcher} instances.
 *
 * @param typesToMatch the {@link SimpMessageType} instance to match on
 * @return the {@link Constraint} associated to the matchers.
 */
public Constraint simpTypeMatchers(SimpMessageType... typesToMatch) {
  MessageMatcher<?>[] typeMatchers = new MessageMatcher<?>[typesToMatch.length];
  for (int i = 0; i < typesToMatch.length; i++) {
    SimpMessageType typeToMatch = typesToMatch[i];
    typeMatchers[i] = new SimpMessageTypeMatcher(typeToMatch);
  }
  return matchers(typeMatchers);
}
origin: spring-projects/spring-security

/**
 * <p>
 * Creates a new instance with the specified pattern, {@link SimpMessageType}, and
 * {@link PathMatcher}.
 *
 * @param pattern the pattern to use
 * @param type the {@link SimpMessageType} to match on or null if any
 * {@link SimpMessageType} should be matched.
 * @param pathMatcher the {@link PathMatcher} to use.
 */
private SimpDestinationMessageMatcher(String pattern, SimpMessageType type,
    PathMatcher pathMatcher) {
  Assert.notNull(pattern, "pattern cannot be null");
  Assert.notNull(pathMatcher, "pathMatcher cannot be null");
  if (!isTypeWithDestination(type)) {
    throw new IllegalArgumentException("SimpMessageType " + type
        + " does not contain a destination and so cannot be matched on.");
  }
  this.matcher = pathMatcher;
  this.messageTypeMatcher = type == null ? ANY_MESSAGE
      : new SimpMessageTypeMatcher(type);
  this.pattern = pattern;
}
origin: spring-projects/spring-security

@Test(expected = IllegalArgumentException.class)
public void constructorNullType() {
  new SimpMessageTypeMatcher(null);
}
origin: spring-projects/spring-security

@Before
public void setup() {
  matcher = new SimpMessageTypeMatcher(SimpMessageType.MESSAGE);
}
origin: spring-projects/spring-security

@Test
public void typeConstructorParameterIsTransmitted() throws Exception {
  matcher = SimpDestinationMessageMatcher.createMessageMatcher("/match",
      pathMatcher);
  MessageMatcher<Object> expectedTypeMatcher = new SimpMessageTypeMatcher(
      SimpMessageType.MESSAGE);
  assertThat(matcher.getMessageTypeMatcher()).isEqualTo(expectedTypeMatcher);
}
origin: org.springframework.security/spring-security-config

/**
 * Maps a {@link List} of {@link SimpDestinationMessageMatcher} instances.
 *
 * @param typesToMatch the {@link SimpMessageType} instance to match on
 * @return the {@link Constraint} associated to the matchers.
 */
public Constraint simpTypeMatchers(SimpMessageType... typesToMatch) {
  MessageMatcher<?>[] typeMatchers = new MessageMatcher<?>[typesToMatch.length];
  for (int i = 0; i < typesToMatch.length; i++) {
    SimpMessageType typeToMatch = typesToMatch[i];
    typeMatchers[i] = new SimpMessageTypeMatcher(typeToMatch);
  }
  return matchers(typeMatchers);
}
origin: apache/servicemix-bundles

/**
 * Maps a {@link List} of {@link SimpDestinationMessageMatcher} instances.
 *
 * @param typesToMatch the {@link SimpMessageType} instance to match on
 * @return the {@link Constraint} associated to the matchers.
 */
public Constraint simpTypeMatchers(SimpMessageType... typesToMatch) {
  MessageMatcher<?>[] typeMatchers = new MessageMatcher<?>[typesToMatch.length];
  for (int i = 0; i < typesToMatch.length; i++) {
    SimpMessageType typeToMatch = typesToMatch[i];
    typeMatchers[i] = new SimpMessageTypeMatcher(typeToMatch);
  }
  return matchers(typeMatchers);
}
origin: apache/servicemix-bundles

/**
 * <p>
 * Creates a new instance with the specified pattern, {@link SimpMessageType}, and
 * {@link PathMatcher}.
 *
 * @param pattern the pattern to use
 * @param type the {@link SimpMessageType} to match on or null if any
 * {@link SimpMessageType} should be matched.
 * @param pathMatcher the {@link PathMatcher} to use.
 */
private SimpDestinationMessageMatcher(String pattern, SimpMessageType type,
    PathMatcher pathMatcher) {
  Assert.notNull(pattern, "pattern cannot be null");
  Assert.notNull(pathMatcher, "pathMatcher cannot be null");
  if (!isTypeWithDestination(type)) {
    throw new IllegalArgumentException("SimpMessageType " + type
        + " does not contain a destination and so cannot be matched on.");
  }
  this.matcher = pathMatcher;
  this.messageTypeMatcher = type == null ? ANY_MESSAGE
      : new SimpMessageTypeMatcher(type);
  this.pattern = pattern;
}
org.springframework.security.messaging.util.matcherSimpMessageTypeMatcher<init>

Javadoc

Creates a new instance

Popular methods of SimpMessageTypeMatcher

  • matches

Popular in Java

  • Updating database using SQL prepared statement
  • runOnUiThread (Activity)
  • requestLocationUpdates (LocationManager)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • Permission (java.security)
    Abstract class for representing access to a system resource. All permissions have a name (whose inte
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now