public PositionInfo(long track, String trackDuration, String trackMetaData, String trackURI, String relTime, String absTime, int relCount, int absCount) { this.track = new UnsignedIntegerFourBytes(track); this.trackDuration = trackDuration; this.trackMetaData = trackMetaData; this.trackURI = trackURI; this.relTime = relTime; this.absTime = absTime; this.relCount = relCount; this.absCount = absCount; }
public long getContainerUpdateIDLong() { return containerUpdateID.getValue(); } }
public String getString() { return getValue().toString(); } }
eventMaximumRateMilliseconds = 200 private UnsignedIntegerFourBytes systemUpdateID = new UnsignedIntegerFourBytes(0); BrowseFlag.valueOrNullOf(browseFlag), filter, firstResult.getValue(), maxResults.getValue(), orderByCriteria ); searchCriteria, filter, firstResult.getValue(), maxResults.getValue(), orderByCriteria );
/** * Call this method after making changes to your content directory. * <p> * This will notify clients that their view of the content directory is potentially * outdated and has to be refreshed. * </p> */ synchronized protected void changeSystemUpdateID() { Long oldUpdateID = getSystemUpdateID().getValue(); systemUpdateID.increment(true); getPropertyChangeSupport().firePropertyChange( "SystemUpdateID", oldUpdateID, getSystemUpdateID().getValue() ); }
synchronized public void receive(UnsignedIntegerFourBytes sequence, Collection<StateVariableValue> newValues) { if (this.currentSequence != null) { // TODO: Handle rollover to 1! if (this.currentSequence.getValue().equals(this.currentSequence.getBits().getMaxValue()) && sequence.getValue() == 1) { System.err.println("TODO: HANDLE ROLLOVER"); return; } if (this.currentSequence.getValue() >= sequence.getValue()) { return; } int difference; long expectedValue = currentSequence.getValue() + 1; if ((difference = (int) (sequence.getValue() - expectedValue)) != 0) { eventsMissed(difference); } } this.currentSequence = sequence; for (StateVariableValue newValue : newValues) { currentValues.put(newValue.getStateVariable().getName(), newValue); } eventReceived(); }
public InstanceID getInstanceID(UnsignedIntegerFourBytes id) { for (InstanceID instanceID : instanceIDs) { if (instanceID.getId().equals(id)) return instanceID; } return null; }
synchronized public void incrementSequence() { this.currentSequence.increment(true); }
eventMaximumRateMilliseconds = 200 private UnsignedIntegerFourBytes systemUpdateID = new UnsignedIntegerFourBytes(0); BrowseFlag.valueOrNullOf(browseFlag), filter, firstResult.getValue(), maxResults.getValue(), orderByCriteria ); searchCriteria, filter, firstResult.getValue(), maxResults.getValue(), orderByCriteria );
/** * Call this method after making changes to your content directory. * <p> * This will notify clients that their view of the content directory is potentially * outdated and has to be refreshed. * </p> */ synchronized protected void changeSystemUpdateID() { Long oldUpdateID = getSystemUpdateID().getValue(); systemUpdateID.increment(true); getPropertyChangeSupport().firePropertyChange( "SystemUpdateID", oldUpdateID, getSystemUpdateID().getValue() ); }
synchronized public void receive(UnsignedIntegerFourBytes sequence, Collection<StateVariableValue> newValues) { if (this.currentSequence != null) { // TODO: Handle rollover to 1! if (this.currentSequence.getValue().equals(this.currentSequence.getBits().getMaxValue()) && sequence.getValue() == 1) { System.err.println("TODO: HANDLE ROLLOVER"); return; } if (this.currentSequence.getValue() >= sequence.getValue()) { return; } int difference; long expectedValue = currentSequence.getValue() + 1; if ((difference = (int) (sequence.getValue() - expectedValue)) != 0) { eventsMissed(difference); } } this.currentSequence = sequence; for (StateVariableValue newValue : newValues) { currentValues.put(newValue.getStateVariable().getName(), newValue); } eventReceived(); }
public <EV extends EventedValue> EV getEventedValue(UnsignedIntegerFourBytes id, Class<EV> type) { for (InstanceID instanceID : getInstanceIDs()) { if (instanceID.getId().equals(id)) { for (EventedValue eventedValue : instanceID.getValues()) { if (eventedValue.getClass().equals(type)) return (EV) eventedValue; } } } return null; }
synchronized public void incrementSequence() { this.currentSequence.increment(true); }
public BrowseResult(String result, long count, long totalMatches, long updatedId) { this( result, new UnsignedIntegerFourBytes(count), new UnsignedIntegerFourBytes(totalMatches), new UnsignedIntegerFourBytes(updatedId) ); }
public long getContainerUpdateIDLong() { return containerUpdateID.getValue(); }
/** * Call this method after making changes to your content directory. * <p> * This will notify clients that their view of the content directory is potentially * outdated and has to be refreshed. * </p> */ synchronized protected void changeSystemUpdateID() { Long oldUpdateID = getSystemUpdateID().getValue(); systemUpdateID.increment(true); getPropertyChangeSupport().firePropertyChange( "SystemUpdateID", oldUpdateID, getSystemUpdateID().getValue() ); }
synchronized public void receive(UnsignedIntegerFourBytes sequence, Collection<StateVariableValue> newValues) { if (this.currentSequence != null) { // TODO: Handle rollover to 1! if (this.currentSequence.getValue().equals(this.currentSequence.getBits().getMaxValue()) && sequence.getValue() == 1) { System.err.println("TODO: HANDLE ROLLOVER"); return; } if (this.currentSequence.getValue() >= sequence.getValue()) { return; } int difference; long expectedValue = currentSequence.getValue() + 1; if ((difference = (int) (sequence.getValue() - expectedValue)) != 0) { eventsMissed(difference); } } this.currentSequence = sequence; for (StateVariableValue newValue : newValues) { currentValues.put(newValue.getStateVariable().getName(), newValue); } eventReceived(); }
log.fine("No window exists, creating new window for player: " + player.getInstanceId()); String title = player.getInstanceId().toString() + ": " + player.getCurrentMediaInfo().getCurrentURI(); playerWindow = new JFrame(title);
public void setEventedValue(UnsignedIntegerFourBytes id, EventedValue ev) { InstanceID instanceID = null; for (InstanceID i : getInstanceIDs()) { if (i.getId().equals(id)) { instanceID = i; } } if (instanceID == null) { instanceID = new InstanceID(id); getInstanceIDs().add(instanceID); } Iterator<EventedValue> it = instanceID.getValues().iterator(); while (it.hasNext()) { EventedValue existingEv = it.next(); if (existingEv.getClass().equals(ev.getClass())) { it.remove(); } } instanceID.getValues().add(ev); }
synchronized public void incrementSequence() { this.currentSequence.increment(true); }