UniPRT SDK  v1.0.0.0
com.UniPRT.Sdk.Mgmt.AMgmtListenerChannels< T > Class Template Referenceabstract
Inheritance diagram for com.UniPRT.Sdk.Mgmt.AMgmtListenerChannels< T >:
com.UniPRT.Sdk.Mgmt.IMgmtMsgListenerChannels< T >

Public Member Functions

 AMgmtListenerChannels ()
 
void ListenerChannelDisconnect (Channel< T > chnlToRemove)
 Disconnect channel. No more messages added to a channel that is disconnected, but the channel can be reconnected in the future. More...
 
void ListenerChannelDisconnectPermanently (Channel< T > chnlToRemove)
 Disconnect a channel permanently so that it cannot be reconnected. More...
 
Channel< T > ListenerChannelGetNew (int capacity, MgmtChannelFilterType chnlType, String solicitedMsgId)
 Creates new channel for caller to listen for fully formed JSON msgs. More...
 
Channel< T > ListenerChannelGetNew (int capacity, MgmtChannelFilterType chnlType)
 
void ListenerChannelConnect (Channel< T > chnlToReconnect, MgmtChannelFilterType chnlType, String solicitedMsgId)
 Connect or reconnect a channel for listening to messages. More...
 
void ListenerChannelConnect (Channel< T > chnlToReconnect, MgmtChannelFilterType chnlType)
 
void ListenerMsgDeposit (T msgToDeposit, String solicitedMsgId)
 

Private Member Functions

boolean AddListenerChannel (Channel< T > chnlToAdd, MgmtChannelFilterType chnlType, String solicitedMsgId)
 
void RemoveListenerFromList (List< Channel< T >> listenerList, Channel< T > chnlToRemove)
 
void AddListenerToList (List< Channel< T >> listenerList, Channel< T > chnlToAdd)
 
List< Channel< T > > MySolicitedChannelList (String solicitedMsgId)
 
void MySolicitedChannelList_Add (String solicitedMsgId, Channel< T > chnlToAdd)
 
void MySolicitedChannelList_Remove (Channel< T > chnlToRemove)
 
Map.Entry< String, List< Channel< T > > > mySolicitedListWithChannel (Channel< T > chnlToSearch)
 
String SolicitedChnlKey (Channel< T > chnlToLookFor)
 
void AddToMsgList (T msgToDeposit, List< Channel< T >> listenerList)
 

Private Attributes

final Semaphore _semaphoreListeners = new Semaphore(1)
 
final List< Channel< T > > _msgListeners_AllMsgs = new ArrayList<>()
 
final List< Channel< T > > _msgListeners_Unsolicited = new ArrayList<>()
 
final List< Channel< T > > _msgListeners_AnySolicited = new ArrayList<>()
 
final Map< String, List< Channel< T > > > _mySolicitedListenerTable = new HashMap<>()
 

Constructor & Destructor Documentation

◆ AMgmtListenerChannels()

Member Function Documentation

◆ AddListenerChannel()

◆ AddListenerToList()

void com.UniPRT.Sdk.Mgmt.AMgmtListenerChannels< T >.AddListenerToList ( List< Channel< T >>  listenerList,
Channel< T >  chnlToAdd 
)
private

◆ AddToMsgList()

void com.UniPRT.Sdk.Mgmt.AMgmtListenerChannels< T >.AddToMsgList ( msgToDeposit,
List< Channel< T >>  listenerList 
)
private

◆ ListenerChannelConnect() [1/2]

void com.UniPRT.Sdk.Mgmt.AMgmtListenerChannels< T >.ListenerChannelConnect ( Channel< T >  chnlToReconnect,
MgmtChannelFilterType  chnlType 
)

◆ ListenerChannelConnect() [2/2]

void com.UniPRT.Sdk.Mgmt.AMgmtListenerChannels< T >.ListenerChannelConnect ( Channel< T >  chnlToReconnect,
MgmtChannelFilterType  chnlType,
String  solicitedMsgId 
)

Connect or reconnect a channel for listening to messages.

solicitedMsgId only applies for channels of MgmtChannelFilterType::MY_SOLICITED_MSGS_ONLY or MgmtChannelFilterType::MY_SOLICITED_AND_UNSOLICITED_MSGS type.

Implements com.UniPRT.Sdk.Mgmt.IMgmtMsgListenerChannels< T >.

◆ ListenerChannelDisconnect()

void com.UniPRT.Sdk.Mgmt.AMgmtListenerChannels< T >.ListenerChannelDisconnect ( Channel< T >  chnlToRemove)

Disconnect channel. No more messages added to a channel that is disconnected, but the channel can be reconnected in the future.

Implements com.UniPRT.Sdk.Mgmt.IMgmtMsgListenerChannels< T >.

Referenced by com.UniPRT.Sdk.Mgmt.AMgmtListenerChannels< String >.ListenerChannelDisconnectPermanently().

◆ ListenerChannelDisconnectPermanently()

void com.UniPRT.Sdk.Mgmt.AMgmtListenerChannels< T >.ListenerChannelDisconnectPermanently ( Channel< T >  chnlToRemove)

Disconnect a channel permanently so that it cannot be reconnected.

Implements com.UniPRT.Sdk.Mgmt.IMgmtMsgListenerChannels< T >.

◆ ListenerChannelGetNew() [1/2]

Channel<T> com.UniPRT.Sdk.Mgmt.AMgmtListenerChannels< T >.ListenerChannelGetNew ( int  capacity,
MgmtChannelFilterType  chnlType 
)

◆ ListenerChannelGetNew() [2/2]

Channel<T> com.UniPRT.Sdk.Mgmt.AMgmtListenerChannels< T >.ListenerChannelGetNew ( int  capacity,
MgmtChannelFilterType  chnlType,
String  solicitedMsgId 
)

Creates new channel for caller to listen for fully formed JSON msgs.

Channel that holds maximum msgs defined by capacity created where oldest items discarded if unread when newer entries added.
solicitedMsgId only applies for channels of SOLICITED_MSGS_ONLY type.

Implements com.UniPRT.Sdk.Mgmt.IMgmtMsgListenerChannels< T >.

Referenced by com.UniPRT.Sdk.Json.JsonComm.SendAndWaitForResponse().

◆ ListenerMsgDeposit()

void com.UniPRT.Sdk.Mgmt.AMgmtListenerChannels< T >.ListenerMsgDeposit ( msgToDeposit,
String  solicitedMsgId 
)

◆ MySolicitedChannelList()

List<Channel<T> > com.UniPRT.Sdk.Mgmt.AMgmtListenerChannels< T >.MySolicitedChannelList ( String  solicitedMsgId)
private

◆ MySolicitedChannelList_Add()

void com.UniPRT.Sdk.Mgmt.AMgmtListenerChannels< T >.MySolicitedChannelList_Add ( String  solicitedMsgId,
Channel< T >  chnlToAdd 
)
private

◆ MySolicitedChannelList_Remove()

void com.UniPRT.Sdk.Mgmt.AMgmtListenerChannels< T >.MySolicitedChannelList_Remove ( Channel< T >  chnlToRemove)
private

◆ mySolicitedListWithChannel()

Map.Entry<String, List<Channel<T> > > com.UniPRT.Sdk.Mgmt.AMgmtListenerChannels< T >.mySolicitedListWithChannel ( Channel< T >  chnlToSearch)
private

◆ RemoveListenerFromList()

void com.UniPRT.Sdk.Mgmt.AMgmtListenerChannels< T >.RemoveListenerFromList ( List< Channel< T >>  listenerList,
Channel< T >  chnlToRemove 
)
private

◆ SolicitedChnlKey()

String com.UniPRT.Sdk.Mgmt.AMgmtListenerChannels< T >.SolicitedChnlKey ( Channel< T >  chnlToLookFor)
private

Member Data Documentation

◆ _msgListeners_AllMsgs

◆ _msgListeners_AnySolicited

◆ _msgListeners_Unsolicited

◆ _mySolicitedListenerTable

◆ _semaphoreListeners


The documentation for this class was generated from the following file: