/** * {@inheritDoc} */ @Override public Asn1Object decode( byte[] controlBytes ) throws DecoderException { ByteBuffer bb = ByteBuffer.wrap( controlBytes ); SyncStateValueContainer container = new SyncStateValueContainer( this ); DECODER.decode( bb, container ); return this; } }
/** * Creates a new SyncStateValueControlContainer object. We will store one grammar, * it's enough ... */ public SyncStateValueContainer() { super(); setGrammar( SyncStateValueGrammar.getInstance() ); setTransition( SyncStateValueStatesEnum.START_STATE ); }
public void action( SyncStateValueContainer container ) { BerValue value = container.getCurrentTLV().getValue(); byte[] entryUUID = value.getData(); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_08106_ENTRY_UUID, Strings.dumpBytes( entryUUID ) ) ); } container.getSyncStateValueControl().setEntryUUID( entryUUID ); // We can have an END transition container.setGrammarEndAllowed( true ); } } );
public void action( SyncStateValueContainer container ) { BerValue value = container.getCurrentTLV().getValue(); byte[] cookie = value.getData(); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_08000_COOKIE, Strings.dumpBytes( cookie ) ) ); } container.getSyncStateValueControl().setCookie( cookie ); // terminal state container.setGrammarEndAllowed( true ); } } );
public void action( SyncStateValueContainer container ) { BerValue value = container.getCurrentTLV().getValue(); byte[] cookie = value.getData(); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_08000_COOKIE, Strings.dumpBytes( cookie ) ) ); } container.getSyncStateValueControl().setCookie( cookie ); // terminal state container.setGrammarEndAllowed( true ); } } );
/** * Creates a new SyncStateValueControlContainer object. We will store one grammar, * it's enough ... */ public SyncStateValueContainer() { super(); setGrammar( SyncStateValueGrammar.getInstance() ); setTransition( SyncStateValueStatesEnum.START_STATE ); }
/** * {@inheritDoc} */ @Override public Asn1Object decode( byte[] controlBytes ) throws DecoderException { ByteBuffer bb = ByteBuffer.wrap( controlBytes ); SyncStateValueContainer container = new SyncStateValueContainer( this ); DECODER.decode( bb, container ); return this; } }
public void action( SyncStateValueContainer container ) { BerValue value = container.getCurrentTLV().getValue(); byte[] entryUUID = value.getData(); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_08106_ENTRY_UUID, Strings.dumpBytes( entryUUID ) ) ); } container.getSyncStateValueControl().setEntryUUID( entryUUID ); // We can have an END transition container.setGrammarEndAllowed( true ); } } );
/** * Creates a new SyncStateValueControlContainer object. We will store one grammar, * it's enough ... */ public SyncStateValueContainer() { super(); setGrammar( SyncStateValueGrammar.getInstance() ); setTransition( SyncStateValueStatesEnum.START_STATE ); }
/** * {@inheritDoc} */ @Override public Asn1Object decode( byte[] controlBytes ) throws DecoderException { ByteBuffer bb = ByteBuffer.wrap( controlBytes ); SyncStateValueContainer container = new SyncStateValueContainer( this ); DECODER.decode( bb, container ); return this; } }
public void action( SyncStateValueContainer container ) { BerValue value = container.getCurrentTLV().getValue(); byte[] cookie = value.getData(); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_08000_COOKIE, Strings.dumpBytes( cookie ) ) ); } container.getSyncStateValueControl().setCookie( cookie ); // terminal state container.setGrammarEndAllowed( true ); } } );
/** * Creates a new SyncStateValueControlContainer object. We will store one grammar, * it's enough ... * * @param control The control to store */ public SyncStateValueContainer( SyncStateValue control ) { super(); this.control = control; setGrammar( SyncStateValueGrammar.getInstance() ); setTransition( SyncStateValueStatesEnum.START_STATE ); }
public void action( SyncStateValueContainer container ) { BerValue value = container.getCurrentTLV().getValue(); byte[] entryUUID = value.getData(); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_08106_ENTRY_UUID, Strings.dumpBytes( entryUUID ) ) ); } container.getSyncStateValueControl().setEntryUUID( entryUUID ); // We can have an END transition container.setGrammarEndAllowed( true ); } } );
/** * Creates a new SyncStateValueControlContainer object. We will store one grammar, * it's enough ... * * @param control The control to store */ public SyncStateValueContainer( SyncStateValue control ) { super(); this.control = control; setGrammar( SyncStateValueGrammar.getInstance() ); setTransition( SyncStateValueStatesEnum.START_STATE ); }
public void action( SyncStateValueContainer container ) throws DecoderException { BerValue value = container.getCurrentTLV().getValue(); try { // Check that the value is into the allowed interval int syncStateType = IntegerDecoder.parse( value, SyncStateTypeEnum.PRESENT.getValue(), SyncStateTypeEnum.MODDN.getValue() ); SyncStateTypeEnum syncStateTypeEnum = SyncStateTypeEnum.getSyncStateType( syncStateType ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_08105_SYNC_STATE_TYPE, syncStateTypeEnum ) ); } container.getSyncStateValueControl().setSyncStateType( syncStateTypeEnum ); // move on to the entryUUID transition container.setGrammarEndAllowed( false ); } catch ( IntegerDecoderException ide ) { String msg = I18n.err( I18n.ERR_08102_SYNC_STATE_VALUE_MODE_DECODING_FAILED ); LOG.error( msg, ide ); throw new DecoderException( msg, ide ); } } } );
/** * Creates a new SyncStateValueControlContainer object. We will store one grammar, * it's enough ... * * @param control The control to store */ public SyncStateValueContainer( SyncStateValue control ) { super(); this.control = control; setGrammar( SyncStateValueGrammar.getInstance() ); setTransition( SyncStateValueStatesEnum.START_STATE ); }
public void action( SyncStateValueContainer container ) throws DecoderException { BerValue value = container.getCurrentTLV().getValue(); try { // Check that the value is into the allowed interval int syncStateType = IntegerDecoder.parse( value, SyncStateTypeEnum.PRESENT.getValue(), SyncStateTypeEnum.MODDN.getValue() ); SyncStateTypeEnum syncStateTypeEnum = SyncStateTypeEnum.getSyncStateType( syncStateType ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_08105_SYNC_STATE_TYPE, syncStateTypeEnum ) ); } container.getSyncStateValueControl().setSyncStateType( syncStateTypeEnum ); // move on to the entryUUID transition container.setGrammarEndAllowed( false ); } catch ( IntegerDecoderException ide ) { String msg = I18n.err( I18n.ERR_08102_SYNC_STATE_VALUE_MODE_DECODING_FAILED ); LOG.error( msg, ide ); throw new DecoderException( msg, ide ); } } } );
public void action( SyncStateValueContainer container ) throws DecoderException { BerValue value = container.getCurrentTLV().getValue(); try { // Check that the value is into the allowed interval int syncStateType = IntegerDecoder.parse( value, SyncStateTypeEnum.PRESENT.getValue(), SyncStateTypeEnum.MODDN.getValue() ); SyncStateTypeEnum syncStateTypeEnum = SyncStateTypeEnum.getSyncStateType( syncStateType ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_08105_SYNC_STATE_TYPE, syncStateTypeEnum ) ); } container.getSyncStateValueControl().setSyncStateType( syncStateTypeEnum ); // move on to the entryUUID transition container.setGrammarEndAllowed( false ); } catch ( IntegerDecoderException ide ) { String msg = I18n.err( I18n.ERR_08102_SYNC_STATE_VALUE_MODE_DECODING_FAILED ); LOG.error( msg, ide ); throw new DecoderException( msg, ide ); } } } );