Package com.comphenix.protocol

Examples of com.comphenix.protocol.PacketType$Status$Client


    this.register = result;
  }
 
  private void associatePackets(Register register, Map<Integer, Class<?>> lookup, Protocol protocol, Sender sender) {
    for (Entry<Integer, Class<?>> entry : lookup.entrySet()) {
      PacketType type = PacketType.fromCurrent(protocol, sender, entry.getKey(), PacketType.UNKNOWN_PACKET);
      register.typeToClass.put(type, entry.getValue());
     
      if (sender == Sender.SERVER)
        register.serverPackets.add(type);
      if (sender == Sender.CLIENT)
View Full Code Here


      // Skip empty packets
      if (buffer.length == 0)
        continue;
     
      DataInputStream data = getDataInput(buffer);
      PacketType type = PacketType.findCurrent(protocol, Sender.SERVER, serializer.deserializeVarInt(data));
     
      if (type == PacketType.Status.Server.OUT_SERVER_INFO) {
        ResponsePacket response = new ResponsePacket();
        response.read(type, data);
        return response;
View Full Code Here

      throw e.getCause();
    }
  }
 
  private Future<String> testInterception(Plugin test) {
    PacketType customPacket = PacketType.fromCurrent(Protocol.STATUS, Sender.CLIENT, 3, -1);
   
    ProtocolLibrary.getProtocolManager().addPacketListener(
      new PacketAdapter(test, PacketType.Status.Server.OUT_SERVER_INFO) {
      @Override
      public void onPacketSending(PacketEvent event) {
View Full Code Here

    /**
     * Stores the current state machine configuration ({@link Status#getAllStates()}) in the system context.
     * @param scInstance the state machine instance holding the current configuration
     */
    public void setSystemAllStatesVariable(final SCInstance scInstance) {
        Status currentStatus = scInstance.getCurrentStatus();
        scInstance.getSystemContext().setLocal(SCXMLSystemContext.ALL_STATES_KEY, currentStatus.getAllStates());
    }
View Full Code Here

            request.setAuthentication(authentication);

            RecoverKeyBinding keyBinding = createRecoverKeyBinding();
            keyBinding.setKeyName(alias);

            Status status = new Status();
            status.setStatusValue(StatusValue.INDETERMINATE);
            keyBinding.setStatus(status);

            request.setRecoverKeyBinding(keyBinding);

            request.addRespondWith(RespondWith.PRIVATE_KEY);
View Full Code Here

            ValidateResult validateResult = getValidateResult(result);
            List keybinds = validateResult.getKeyBindingList();
            KeyBinding keybinding = (KeyBinding) keybinds.get(0);

            Status status = keybinding.getStatus();

            return StatusValue.VALID.equals(status.getStatusValue());

        } catch (Exception ex) {
            if (LOG.isDebugEnabled()) {
                LOG.debug("", ex);
            }
View Full Code Here

        kb.setValidityInterval(notBefore, notAfter);
    }

    private void addStatus(boolean valid, KeyBinding kb) {
        Status status = new Status();
        status
                .setStatusValue((valid) ? StatusValue.VALID
                        : StatusValue.INVALID);
        if (valid) {
            status.addValidReason(ValidReason.ISSUER_TRUST);
            status.addValidReason(ValidReason.REVOCATION_STATUS);
            status.addValidReason(ValidReason.SIGNATURE);
            status.addValidReason(ValidReason.VALIDITY_INTERVAL);
        } else {
            status.addInvalidReason(InvalidReason.ISSUER_TRUST);
            status.addInvalidReason(InvalidReason.REVOCATION_STATUS);
            status.addInvalidReason(InvalidReason.SIGNATURE);
            status.addInvalidReason(InvalidReason.VALIDITY_INTERVAL);
        }
        kb.setStatus(status);
    }
View Full Code Here

TOP

Related Classes of com.comphenix.protocol.PacketType$Status$Client

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.