Examples of accept()


Examples of org.jboss.resteasy.mock.MockHttpRequest.accept()

   {
      MockHttpRequest request = null;
      try
      {
         request = MockHttpRequest.create(httpMethod, path).contentType(contentType);
         request.accept(accepts);
      }
      catch (URISyntaxException e)
      {
         throw new RuntimeException(e);
      }
View Full Code Here

Examples of org.jboss.resteasy.spi.interception.AcceptedByMethod.accept()

         if (interceptor instanceof AcceptedByMethod)
         {
            if (target == null || !(target instanceof Method)) continue;

            AcceptedByMethod accepted = (AcceptedByMethod) interceptor;
            if (accepted.accept(declaring, (Method) target))
            {
               addNewInterceptor(list, interceptor);
            }
         }
         else
View Full Code Here

Examples of org.jboss.seam.remoting.annotationparser.syntaxtree.Node.accept()

      AnnotationParser parser = new AnnotationParser(new StringReader(declaration));
     
      try
      {
         Node root = parser.AnnotationsUnit();
         root.accept(this);
      }
      catch (ParseException e)
      {
         throw new IllegalArgumentException(
               "Error while parsing annotation declaration: " + declaration, e);
View Full Code Here

Examples of org.jdesktop.wonderland.client.jme.dnd.spi.DataFlavorHandlerSPI.accept()

     * @param event the event to determine the file name of
     */
    public String getFileExtension(DropTargetEvent3D event) {
        for (DataFlavor flavor : getSupportedFlavors(event.getDataFlavors())) {
            DataFlavorHandlerSPI handler = getDataFlavorHandler(flavor);
            if (handler.accept(event, flavor)) {
                String extension = handler.getFileExtension(event, flavor);
                if (extension != null) {
                    return extension;
                }
            }
View Full Code Here

Examples of org.jitterbit.integration.database.driver.DriverDescriptor.accept()

public final class DatabaseInfoProviderFactory {

    public static DatabaseInfoProvider createProvider(ConnectionParams params) {
        DriverDescriptor driver = params.getDriver();
        Visitor v = new Visitor();
        driver.accept(v);
        return v.provider;
    }


    private static final class Visitor implements DriverDescriptorVisitor {
View Full Code Here

Examples of org.jivesoftware.smack.filter.FromMatchesFilter.accept()

      @Override
      public String toXML() { return null; }
  };

  packet.setFrom(FULL_JID1_R1);
  assertTrue(filter.accept(packet));
 
  packet.setFrom(BASE_JID1);
  assertFalse(filter.accept(packet));
 
  packet.setFrom(FULL_JID1_R2);
View Full Code Here

Examples of org.jivesoftware.smack.filter.PacketFilter.accept()

    }

    void sendMessage(Chat chat, Message message) {
        for(Map.Entry<PacketInterceptor, PacketFilter> interceptor : interceptors.entrySet()) {
            PacketFilter filter = interceptor.getValue();
            if(filter != null && filter.accept(message)) {
                interceptor.getKey().interceptPacket(message);
            }
        }
        // Ensure that messages being sent have a proper FROM value
        if (message.getFrom() == null) {
View Full Code Here

Examples of org.jivesoftware.smackx.bytestreams.ibb.InBandBytestreamRequest.accept()

    public void shouldReturnSessionIfRequestIsAccepted() throws Exception {
        InBandBytestreamRequest ibbRequest = new InBandBytestreamRequest(
                        byteStreamManager, initBytestream);

        // accept request
        InBandBytestreamSession session = ibbRequest.accept();

        // capture reply to the In-Band Bytestream open request
        ArgumentCaptor<IQ> argument = ArgumentCaptor.forClass(IQ.class);
        verify(connection).sendPacket(argument.capture());
View Full Code Here

Examples of org.jivesoftware.smackx.bytestreams.socks5.Socks5BytestreamRequest.accept()

            // build SOCKS5 Bytestream request with the bytestream initialization
            Socks5BytestreamRequest byteStreamRequest = new Socks5BytestreamRequest(
                            byteStreamManager, bytestreamInitialization);

            // accept the stream (this is the call that is tested here)
            byteStreamRequest.accept();

            fail("exception should be thrown");
        }
        catch (XMPPException e) {
            assertTrue(e.getMessage().contains("Could not establish socket with any provided host"));
View Full Code Here

Examples of org.jpos.iso.channel.GZIPChannel.accept()

    @Test
    public void testAcceptThrowsSocketException() throws Throwable {
        BaseChannel gZIPChannel = new GZIPChannel();
        ServerSocket s = new ServerSocket();
        try {
            gZIPChannel.accept(s);
            fail("Expected SocketException to be thrown");
        } catch (SocketException ex) {
            assertEquals("ex.getClass()", SocketException.class, ex.getClass());
            assertNull("(GZIPChannel) gZIPChannel.logger", ((GZIPChannel) gZIPChannel).logger);
            assertNull("(GZIPChannel) gZIPChannel.originalRealm", ((GZIPChannel) gZIPChannel).originalRealm);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.