de.bsvrz.puk.config.main.communication.query
Class ForeignConfigRequester

java.lang.Object
  extended by de.bsvrz.puk.config.main.communication.query.ForeignConfigRequester

public class ForeignConfigRequester
extends Object

TBD RS dokumentieren.

Author:
Kappich Systemberatung

Nested Class Summary
(package private)  class ForeignConfigRequester.CommunicationHandler
           
private  class ForeignConfigRequester.DataQueryInfo
           
static interface ForeignConfigRequester.ForeignCommunicationStateListener
           
(package private) static class ForeignConfigRequester.ProxyKey
           
 
Field Summary
private  CopyOnWriteArrayList<ForeignConfigRequester.ForeignCommunicationStateListener> _communicationStateListeners
           
private  boolean _communicationTimedout
           
private  boolean _communicatorConnected
           
private  boolean _communicatorStarted
           
private static Debug _debug
          DebugLogger für Debug-Ausgaben
private  ForeignConfigCommunicator _foreignConfigCommunicator
           
private  ForeignObjectManager _foreignObjectManager
           
private  SystemObject _localAuthority
           
private  Map<ForeignConfigRequester.ProxyKey,ForeignMutableCollectionProxy> _mutableCollectionProxies
           
private  AttributeGroup _requestAtg
           
private  int _requestIndex
           
private  Set<ForeignMutableCollectionProxy> _subscribedProxies
           
private  HashMap<Integer,ForeignConfigRequester.DataQueryInfo> _waitingObjectDataQueries
           
private  HashMap<Long,List<ForeignObjectTransferListener>> _waitingObjectQueries
           
 
Constructor Summary
ForeignConfigRequester(ForeignObjectManager foreignObjectManager, ConfigurationAuthority foreignAuthority, ForeignConfigReceiveCommunicator foreignConfigReceiveCommunicator)
           
 
Method Summary
 void addCommunicationStateListener(ForeignConfigRequester.ForeignCommunicationStateListener listener)
           
 ScheduledExecutorService getExecutor()
           
 ForeignMutableCollectionProxy getForeignMutableCollectionProxy(short internalSimVariant, MutableCollection mutableCollection)
           
 ForeignObjectManager getForeignObjectManager()
           
 int getNewRequestIndex()
           
 boolean isCommunicatorConnected()
           
private  void notifyObjectDataComplete(long id, ForeignDynamicObject foreignDynamicObject)
           
 void queryObject(Long id, ForeignObjectTransferListener transferListener)
           
 void queryObjectData(ForeignDynamicObject object)
           
 void removeCommunicationStateListener(ForeignConfigRequester.ForeignCommunicationStateListener listener)
           
private  void sendObjectDataQuery(ForeignDynamicObject object)
           
private  void sendObjectQuery(long id)
           
 int sendRequest(String messageType, byte[] data)
           
 int sendRequest(String messageType, byte[] data, int requestIndex)
           
private  void sendSubscription(ForeignMutableCollectionProxy proxy)
           
 void subscribe(ForeignMutableCollectionProxy proxy)
           
 void unsubscribe(ForeignMutableCollectionProxy proxy)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_debug

private static final Debug _debug
DebugLogger für Debug-Ausgaben


_requestIndex

private int _requestIndex

_foreignObjectManager

private ForeignObjectManager _foreignObjectManager

_mutableCollectionProxies

private final Map<ForeignConfigRequester.ProxyKey,ForeignMutableCollectionProxy> _mutableCollectionProxies

_foreignConfigCommunicator

private ForeignConfigCommunicator _foreignConfigCommunicator

_requestAtg

private AttributeGroup _requestAtg

_communicatorStarted

private boolean _communicatorStarted

_communicatorConnected

private boolean _communicatorConnected

_communicationTimedout

private boolean _communicationTimedout

_subscribedProxies

private Set<ForeignMutableCollectionProxy> _subscribedProxies

_localAuthority

private SystemObject _localAuthority

_waitingObjectQueries

private HashMap<Long,List<ForeignObjectTransferListener>> _waitingObjectQueries

_waitingObjectDataQueries

private HashMap<Integer,ForeignConfigRequester.DataQueryInfo> _waitingObjectDataQueries

_communicationStateListeners

private CopyOnWriteArrayList<ForeignConfigRequester.ForeignCommunicationStateListener> _communicationStateListeners
Constructor Detail

ForeignConfigRequester

public ForeignConfigRequester(ForeignObjectManager foreignObjectManager,
                              ConfigurationAuthority foreignAuthority,
                              ForeignConfigReceiveCommunicator foreignConfigReceiveCommunicator)
Method Detail

getForeignMutableCollectionProxy

public ForeignMutableCollectionProxy getForeignMutableCollectionProxy(short internalSimVariant,
                                                                      MutableCollection mutableCollection)

getExecutor

public ScheduledExecutorService getExecutor()

subscribe

public void subscribe(ForeignMutableCollectionProxy proxy)

unsubscribe

public void unsubscribe(ForeignMutableCollectionProxy proxy)

getForeignObjectManager

public ForeignObjectManager getForeignObjectManager()

queryObject

public void queryObject(Long id,
                        ForeignObjectTransferListener transferListener)

queryObjectData

public void queryObjectData(ForeignDynamicObject object)

addCommunicationStateListener

public void addCommunicationStateListener(ForeignConfigRequester.ForeignCommunicationStateListener listener)

removeCommunicationStateListener

public void removeCommunicationStateListener(ForeignConfigRequester.ForeignCommunicationStateListener listener)

sendRequest

public int sendRequest(String messageType,
                       byte[] data)
                throws SendSubscriptionNotConfirmed,
                       IllegalStateException
Throws:
SendSubscriptionNotConfirmed
IllegalStateException

sendRequest

public int sendRequest(String messageType,
                       byte[] data,
                       int requestIndex)
                throws SendSubscriptionNotConfirmed,
                       IllegalStateException
Throws:
SendSubscriptionNotConfirmed
IllegalStateException

getNewRequestIndex

public int getNewRequestIndex()

sendSubscription

private void sendSubscription(ForeignMutableCollectionProxy proxy)

sendObjectQuery

private void sendObjectQuery(long id)

sendObjectDataQuery

private void sendObjectDataQuery(ForeignDynamicObject object)

notifyObjectDataComplete

private void notifyObjectDataComplete(long id,
                                      ForeignDynamicObject foreignDynamicObject)

isCommunicatorConnected

public boolean isCommunicatorConnected()