Package org.ejbca.core.protocol.cmp

Examples of org.ejbca.core.protocol.cmp.CMPSendTCP


        log.debug("New socket created.");
        socket = new Socket(config.serverAddress, config.serverPort);
        socket.setKeepAlive(true);
        this.sockets.put(handler, socket);
      }
      final CMPSendTCP send = new CMPSendTCP( message, socket, doClose );
      final boolean isServerClose = (send.flags&1)>0;
      if ( isServerClose ) {
        removeSocket(handler);
      }
      return new ServerResult( send.response, isServerClose );
View Full Code Here


     * @see org.ejbca.ui.web.protocol.CmpProxyServlet.Connection#send(byte[], javax.servlet.http.HttpServletResponse, java.lang.String)
     */
    @Override
    public void send(byte message[], HttpServletResponse servletResp, String contentType) throws Exception {
      final Socket socket = getFree();
      final CMPSendTCP send = new CMPSendTCP( message, socket, false );
      final boolean isServerClose = (send.flags&1)>0;
      if ( isServerClose ) {
        socket.close();
      } else {
        synchronized(this) {
View Full Code Here

            return sendCmpTcp(message, sessionData.getSocket());
        }
       
        private byte[] sendCmpTcp(final byte[] message, final Socket socket) {
            try {
                final CMPSendTCP send = new CMPSendTCP( message, socket, false );
                if ( send.version!=10 ) {
                    StressTest.this.performanceTest.getLog().error("Wrong version. Is "+send.version+" should be 10.");
                }
                if ( send.msgType!=5 ) {
                    StressTest.this.performanceTest.getLog().error("Wrong message type. Is "+send.msgType+" should be 5.");
View Full Code Here

TOP

Related Classes of org.ejbca.core.protocol.cmp.CMPSendTCP

Copyright © 2018 www.massapicom. 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.