/* (non-Javadoc)
@see com.ibm.ws.sib.processor.runtime.SIMPRemoteBrowserReceiverControllable#getBrowseID()
342617
public long getBrowseID()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.entry(tc, "getBrowseID");
      
    long browseID = aoBrowserSession.getKey().getBrowseId();
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.exit(tc, "getBrowseID", new Long(browseID));
    return browseID;
  }
65121
@Override
    public WebserviceSecurity getWebserviceSecurity() {
        if (delegate == null) {
            return this.webServiceSecurity;
        } else {
            return this.webServiceSecurity == null ? delegate.getWebserviceSecurity() : this.webServiceSecurity;
        }
    }
756004
public SIMPReceivedMessageControllable getReceivedMessageByID(String id)
  {
    SIMPReceivedMessageControllable returnMessage=null;
    SIMPIterator iterator = getReceivedMessageIterator(SIMPConstants.SIMPCONTROL_RETURN_ALL_MESSAGES);
    while(iterator.hasNext())
    {
      SIMPReceivedMessageControllable receivedMessage = (SIMPReceivedMessageControllable)iterator.next();
      String msgID = receivedMessage.getId();
      if(msgID.equals(id))
      {
        returnMessage = receivedMessage;
        break;
      }
    }
    return returnMessage;
  }
332013
public String htmlSource() {
        try {
            return driver.getPageSource();
        } catch (Exception e) {
            log.warn(e);
            return null;
        }
    }
188321
public long getPreviousSequenceId()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "getPreviousSequenceId");
    long previousSequenceID=0;
    try
    {
      SIMPMessage msg = getSIMPMessage();
      if(msg!=null)
      {
        previousSequenceID = msg.getMessage().getGuaranteedValueStartTick()-1;
      }
    }
    catch (SIResourceException e)
    {
      // No FFDC code needed
      SibTr.exception(tc, e);
    } 
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "getPreviousSequenceId", Long.valueOf(previousSequenceID));
    return previousSequenceID;
  }
991229
public SIMPIterator getQueuedMessageIterator() throws SIMPRuntimeOperationFailedException
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "getQueuedMessageIterator");

    List<ControlAdapter> messages = new ArrayList<ControlAdapter>();
    NonLockingCursor cursor = null;
    try
    {
      cursor = _aoStream.itemStream.newNonLockingItemCursor(null);
      cursor.allowUnavailableItems();
      AOValue item = (AOValue)cursor.next();
      while(item != null)
      {
        try
        {
          // It's possible to get a null adapter back 
          ControlAdapter cAdapter = item.getControlAdapter();
          if(cAdapter != null)
            messages.add(cAdapter);
          
          item = (AOValue)cursor.next();
        }
        catch (NotInMessageStore ef)
        {
          // No FFDC code needed
          // The message has already been consumed. Trace the exception but allow processing to continue.
          SibTr.exception(tc, ef);
        }
      }      
    }
    catch (MessageStoreException e)
    {
      FFDCFilter.processException(
        e,
        "com.ibm.ws.sib.processor.runtime.RemoteConsumerTransmit.getQueuedMessageIterator",
        "1:467:1.44", 
        this);
        
      SIMPRuntimeOperationFailedException e1 =
        new SIMPRuntimeOperationFailedException(
          nls.getFormattedMessage(
            "INTERNAL_MESSAGING_ERROR_CWSIP0003",
            new Object[] {"RemoteConsumerTransmit.getQueuedMessageIterator",
                          "1:475:1.44", 
                          e,
                          _aoStream.streamId},
            null), e);
            
      SibTr.exception(tc, e1);
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "getQueuedMessageIterator", e1);
      throw e1;
    }
    finally
    {
      if (cursor != null)
        cursor.finished();               
    }
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "getQueuedMessageIterator");
      
    return new BasicSIMPIterator(messages.iterator());    
  }
414699
public SIMPRequestMessageInfo getRequestMessageInfo() throws SIMPRuntimeOperationFailedException
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "getRequestMessageInfo");

    SIMPRequestMessageInfo requestMessageInfo = null;
    try
    {
      if (State.REQUEST.toString().equals(getState()))
      {
        // This RemoteMessageRequest is in state request so lets get the info
        TickRange tickRange = _aiStream.getTickRange(_tick);
        requestMessageInfo = new RequestMessageInfo((AIRequestedTick)tickRange.value);
      }
    }
    catch(SIMPException e)
    {
      // FFDC
      FFDCFilter.processException(
        e,
        "com.ibm.ws.sib.processor.runtime.RemoteMessageRequest.getRequestMessageInfo",
        "1:407:1.34",
        this);

      SIMPRuntimeOperationFailedException e1 =
        new SIMPRuntimeOperationFailedException(
          nls.getFormattedMessage(
            "INTERNAL_MESSAGING_ERROR_CWSIP0003",
            new Object[] {"RemoteMessageRequest.getRequestMessageInfo",
                          "1:415:1.34",
                          e,
                          _aiStream.getStreamId()},
            null), e);

      SibTr.exception(tc, e1);
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "getRequestMessageInfo", e1);
      throw e1;
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "getRequestMessageInfo", requestMessageInfo);
    return requestMessageInfo;
  }
155532
@Override
	public String getBrowserName() {
		if (wd != null) {
			Capabilities capabilities = ((HasCapabilities) wd)
					.getCapabilities();
			if (capabilities != null) {
				return capabilities.getBrowserName();
			}
			return null;
		}
		return null;
	}
1231033
public SIMPIterator getPubSubInboundReceiverIterator() {
		if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
			SibTr.entry(tc, "getPubSubInboundReceiverIterator");

		TargetStreamManager tsm = getInputHandler().getTargetStreamManager();
		SIMPIterator itr = tsm.getTargetStreamSetControlIterator();

		if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
			SibTr.exit(tc, "getPubSubInboundReceiverIterator", itr);

		return itr;
	}
74881
@SuppressWarnings("static-method")
	public IJavaElement getSelectedResource(IStructuredSelection selection) {
		IJavaElement elem = null;
		if (selection != null && !selection.isEmpty()) {
			final Object object = selection.getFirstElement();
			if (object instanceof IAdaptable) {
				final IAdaptable adaptable = (IAdaptable) object;
				elem = adaptable.getAdapter(IJavaElement.class);
				if (elem == null) {
					elem = getPackage(adaptable);
				}
			}
		}
		if (elem == null) {
			final IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
			IWorkbenchPart part = activePage.getActivePart();
			if (part instanceof ContentOutline) {
				part = activePage.getActiveEditor();
			}
			if (part instanceof XtextEditor) {
				final IXtextDocument doc = ((XtextEditor) part).getDocument();
				final IFile file = doc.getAdapter(IFile.class);
				elem = getPackage(file);
			}
		}
		if (elem == null || elem.getElementType() == IJavaElement.JAVA_MODEL) {
			try {
				final IJavaProject[] projects = JavaCore.create(ResourcesPlugin.getWorkspace().getRoot()).getJavaProjects();
				if (projects.length == 1) {
					elem = projects[0];
				}
			} catch (JavaModelException e) {
				throw new RuntimeException(e.getMessage());
			}
		}
		return elem;
	}
187559
@Override
	public String getBrowserVersion() {
		if (wd != null) {
			Capabilities capabilities = ((HasCapabilities) wd)
					.getCapabilities();
			if (capabilities != null) {
				return capabilities.getVersion();
			}
			return null;
		}
		return null;
	}
1206446
@Override
    public String getMessageSelector() throws JMSRuntimeException {

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "getMessageSelector");

        String messageSelector = null;

        try {
            messageSelector = messageConsumer.getMessageSelector();
        } catch (JMSException jmse) {
            throw (JMSRuntimeException) JmsErrorUtils.getJMS2Exception(jmse, JMSRuntimeException.class);
        } finally {
            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                SibTr.exit(this, tc, "getMessageSelector", messageSelector);
        }
        return messageSelector;
    }
515950
public SIMPIterator getPubSubDeliveryStreamSetReceiverIterator() {
		if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
			SibTr.entry(tc, "getPubSubDeliveryStreamSetReceiverIterator");

		SIMPIterator iterator = this.getInputHandler().getTargetStreamManager()
				.getTargetStreamSetControlIterator();

		if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
			SibTr.entry(tc, "getPubSubDeliveryStreamSetReceiverIterator");
		return iterator;
	}
1083734
public List<ValueNotification> getByElementID(String elementID) {
        if(elementID == null)
            return null;
        List<ValueNotification> found = new ArrayList<ValueNotification>();
        for (Notification n: NotificationManager.notifications){
            try{
                if (((ValueNotification)n).getElementID().equals(elementID)) {
                    logger.fine("...found a match for getByElementID query. With elementID: "+elementID);
                    found.add((ValueNotification) n);
                }
            } catch (ClassCastException e) {
                // Nothing to do. Its normal when comparts value an interaction notifications.  
            }
        }
        if(found.size()>0)        
            return found;
        return null;
    }
1212563
public String getId()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.entry(tc, "getId");
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.exit(tc, "getId", aoBrowserSession.toString());
    return aoBrowserSession.toString();
  }
1159582
@Override
    public JsDestinationAddress getReplyDestination()
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "getReplyDestination");

        if (!_replySet)
        {
            // Create a JsDestinationAddress from the qualifiedName
            QualifiedDestinationName name = definition.getReplyDestination();

            if (name != null)
                _replyDestination = SIMPUtils.createJsDestinationAddress(
                                                                         name.getDestination(),
                                                                         messageProcessor.getMessagingEngineUuid(),
                                                                         name.getBus());

            _replySet = true;
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "getReplyDestination", _replyDestination);

        return _replyDestination;
    }
1009880
public java.lang.String getProviderId() {
    java.lang.Object ref = providerId_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      providerId_ = s;
      return s;
    }
  }