Tabnine Logo
JISession.getSessionIdentifier
Code IndexAdd Tabnine to your IDE (free)

How to use
getSessionIdentifier
method
in
org.jinterop.dcom.core.JISession

Best Java code snippets using org.jinterop.dcom.core.JISession.getSessionIdentifier (Showing top 20 results out of 315)

origin: org.openscada.jinterop/org.openscada.jinterop.core

private void addDereferencedIpids ( final String IPID, final byte[] oid )
{
  logger.info ( "addDereferencedIpids for session : {} , IPID is: {}", getSessionIdentifier (), IPID );
  synchronized ( mutex )
  {
    if ( !this.listOfDeferencedIpids.contains ( IPID ) )
    {
      this.listOfDeferencedIpids.add ( IPID );
    }
  }
  //Will call the JIComOxidRuntime, and that is synched on mutex3, but that will not cause a deadlock, since
  //it or rather any method of JIComOxidRuntime does not call back into JISession.
  JIComOxidRuntime.delIPIDReference ( IPID, new JIObjectId ( oid, false ), this );
}
origin: org.kohsuke.jinterop/j-interop

private static void postDestroy(JISession session) throws JIException
{
  //now destroy all linked sessions
  if (JISystem.getLogger().isLoggable(Level.INFO))
  {
    JISystem.getLogger().info("About to destroy links for Session: " + session.getSessionIdentifier() + " , size of which is " + session.links.size());
  }
  for (int i = 0; i < session.links.size();i++)
  {
    JISession.destroySession((JISession)session.links.get(i));
  }
  session.links.clear();
  //finally any oids exported by this session.
  JIComOxidRuntime.destroySessionOIDs(session.getSessionIdentifier());
}
origin: org.jinterop/j-interop

private static void postDestroy(JISession session) throws JIException
{
  //now destroy all linked sessions
  if (JISystem.getLogger().isLoggable(Level.INFO))
  {
    JISystem.getLogger().info("About to destroy links for Session: " + session.getSessionIdentifier() + " , size of which is " + session.links.size());
  }
  
  for (int i = 0; i < session.links.size();i++)
  {
    JISession.destroySession((JISession)session.links.get(i));
  }
  
  session.links.clear();
  //finally any oids exported by this session.
  JIComOxidRuntime.destroySessionOIDs(session.getSessionIdentifier());
}
 
origin: org.openscada.jinterop/org.openscada.jinterop.core

/**
 * @exclude
 * @param IPID
 */
private void addToSession ( final String IPID, final byte[] oid, final boolean dontping )
{
  //Weak reference of the object
  //mapOfObjects.put(new WeakReference(IPID,referenceQueueOfCOMObjects),IPID);
  //it does not matter if we create a new OID here, the OxidCOMRunttime API uses the OID in the MAP , and not this one.
  final JIObjectId joid = new JIObjectId ( oid, dontping );
  JIComOxidRuntime.addUpdateOXIDs ( this, IPID, joid );
  logger.info ( "[addToSession] Adding IPID: {} to session: {}", IPID, getSessionIdentifier () );
}
origin: org.jinterop/j-interop

private void addDereferencedIpids(String IPID, byte[] oid)
{
  if (JISystem.getLogger().isLoggable(Level.INFO))
  {
    JISystem.getLogger().info("addDereferencedIpids for session : " + getSessionIdentifier() + " , IPID is: " + IPID);
  }
  
  synchronized (mutex) {
    if (!listOfDeferencedIpids.contains(IPID))
    {
      listOfDeferencedIpids.add(IPID);
    }
  }
  
  //Will call the JIComOxidRuntime, and that is synched on mutex3, but that will not cause a deadlock, since
  //it or rather any method of JIComOxidRuntime does not call back into JISession.
  JIComOxidRuntime.delIPIDReference(IPID,new JIObjectId(oid),this);
}
 
origin: org.kohsuke.jinterop/j-interop

private void addDereferencedIpids(String IPID, byte[] oid)
{
  if (JISystem.getLogger().isLoggable(Level.INFO))
  {
    JISystem.getLogger().info("addDereferencedIpids for session : " + getSessionIdentifier() + " , IPID is: " + IPID);
  }
  synchronized (mutex) {
    if (!listOfDeferencedIpids.contains(IPID))
    {
      listOfDeferencedIpids.add(IPID);
    }
  }
  //Will call the JIComOxidRuntime, and that is synched on mutex3, but that will not cause a deadlock, since
  //it or rather any method of JIComOxidRuntime does not call back into JISession.
  JIComOxidRuntime.delIPIDReference(IPID,new JIObjectId(oid,false),this);
}
origin: org.kohsuke.jinterop/j-interop

  public String toString()
  {
    return "IJIComObject[" + internal_getInterfacePointer() + " , session: " + getAssociatedSession().getSessionIdentifier() + ", isLocal: " + isLocalReference() + "]";
  }
}
origin: org.jinterop/j-interop

  public String toString()
  {
    return "IJIComObject[" + internal_getInterfacePointer() + " , session: " + getAssociatedSession().getSessionIdentifier() + ", isLocal: " + isLocalReference() + "]";
  }
}
origin: org.openscada.jinterop/org.openscada.jinterop.core

  @Override
  public String toString ()
  {
    return "IJIComObject[" + internal_getInterfacePointer () + " , session: " + getAssociatedSession ().getSessionIdentifier () + ", isLocal: " + isLocalReference () + "]";
  }
}
origin: org.jinterop/j-interop

/**
 * @exclude
 * @param IPID
 */
private void addToSession(String IPID,byte[] oid)
{
  //Weak reference of the object
  //mapOfObjects.put(new WeakReference(IPID,referenceQueueOfCOMObjects),IPID);
  //it does not matter if we create a new OID here, the OxidCOMRunttime API uses the OID in the MAP , and not this one.
  JIObjectId joid = new JIObjectId(oid);
  JIComOxidRuntime.addUpdateOXIDs(this,IPID,joid);
  if (JISystem.getLogger().isLoggable(Level.INFO))
  {
    JISystem.getLogger().info("[addToSession] Adding IPID: " + IPID + " to session: " + getSessionIdentifier());
  }
}
 
origin: org.openscada.jinterop/org.openscada.jinterop.core

private JIStruct prepareForReleaseRef ( final String IPID, final int numInstancesfirsttime ) throws JIException
{
  final JIStruct remInterface = new JIStruct ();
  remInterface.addMember ( new rpc.core.UUID ( IPID ) );
  remInterface.addMember ( new Integer ( numInstancesfirsttime + 5 ) ); // numInstancesfirsttime of the original and 5 for the addRef done later on.
  remInterface.addMember ( new Integer ( 0 ) );//private refs = 0
  logger.warn ( "prepareForReleaseRef: Releasing numInstancesfirsttime + 5 references of IPID: {} session: {} , numInstancesfirsttime is {}", new Object[] { IPID, getSessionIdentifier (), numInstancesfirsttime } );
  debug_delIpids ( IPID, numInstancesfirsttime + 5 );
  return remInterface;
}
origin: org.kohsuke.jinterop/j-interop

/**
 * @exclude
 * @param IPID
 */
private void addToSession(String IPID,byte[] oid, boolean dontping)
{
  //Weak reference of the object
  //mapOfObjects.put(new WeakReference(IPID,referenceQueueOfCOMObjects),IPID);
  //it does not matter if we create a new OID here, the OxidCOMRunttime API uses the OID in the MAP , and not this one.
  JIObjectId joid = new JIObjectId(oid,dontping);
  JIComOxidRuntime.addUpdateOXIDs(this,IPID,joid);
  if (JISystem.getLogger().isLoggable(Level.INFO))
  {
    JISystem.getLogger().info("[addToSession] Adding IPID: " + IPID + " to session: " + getSessionIdentifier());
  }
}
origin: org.jinterop/j-interop

private JIStruct prepareForReleaseRef(String IPID) throws JIException
{
  JIStruct remInterface = new JIStruct();
  remInterface.addMember(new rpc.core.UUID(IPID));
  remInterface.addMember(new Integer(5 + 5)); // 5 of the original and 5 for the addRef done later on.
  remInterface.addMember(new Integer(0));//private refs = 0
  if (JISystem.getLogger().isLoggable(Level.WARNING))
  {
    JISystem.getLogger().warning("prepareForReleaseRef: Releasing 10 references of IPID: " + IPID + " session: " + getSessionIdentifier());
    debug_delIpids(IPID, 10);
  }
  return remInterface;
}
origin: org.kohsuke.jinterop/j-interop

private JIStruct prepareForReleaseRef(String IPID, int numInstancesfirsttime) throws JIException
{
  JIStruct remInterface = new JIStruct();
  remInterface.addMember(new rpc.core.UUID(IPID));
  remInterface.addMember(new Integer(numInstancesfirsttime + 5)); // numInstancesfirsttime of the original and 5 for the addRef done later on.
  remInterface.addMember(new Integer(0));//private refs = 0
  if (JISystem.getLogger().isLoggable(Level.INFO))
  {
    JISystem.getLogger().warning("prepareForReleaseRef: Releasing numInstancesfirsttime + 5 references of IPID: " 
        + IPID + " session: " + getSessionIdentifier() + " , numInstancesfirsttime is " + 
        numInstancesfirsttime);
  }
  debug_delIpids(IPID, numInstancesfirsttime + 5);
  return remInterface;	
}
 
origin: org.openscada.jinterop/org.openscada.jinterop.core

private void releaseRefs ( final JIArray arrayOfStructs, final boolean fromDestroy ) throws JIException
{
  logger.info ( "In releaseRefs for session : {} , array length is: {}", getSessionIdentifier (), (short) ( (Object[])arrayOfStructs.getArrayInstance () ).length );
  final JICallBuilder obj = new JICallBuilder ( true );
  obj.setOpnum ( 2 );//release
  //length
  obj.addInParamAsShort ( (short) ( (Object[])arrayOfStructs.getArrayInstance () ).length, JIFlags.FLAG_NULL );
  obj.addInParamAsArray ( arrayOfStructs, JIFlags.FLAG_NULL );
  obj.fromDestroySession = fromDestroy;
  this.stub2.addRef_ReleaseRef ( obj );
  //ignore the results
}
origin: org.openscada.jinterop/org.openscada.jinterop.core

void releaseRef ( final String IPID, final int numinstances ) throws JIException
{
  logger.info ( "releaseRef:Reclaiming from Session: {} , the IPID: {}, numinstances is {}", numinstances, new Object[] { getSessionIdentifier (), IPID, numinstances } );
  final JICallBuilder obj = new JICallBuilder ( true );
  obj.setParentIpid ( IPID );
  obj.setOpnum ( 2 );//release
  //length
  obj.addInParamAsShort ( (short)1, JIFlags.FLAG_NULL );
  //ipid to addfref on
  final JIArray array = new JIArray ( new rpc.core.UUID[] { new rpc.core.UUID ( IPID ) }, true );
  obj.addInParamAsArray ( array, JIFlags.FLAG_NULL );
  //TODO requesting 5 for now, will later build caching mechnaism to exhaust 5 refs first before asking for more
  // same with release.
  obj.addInParamAsInt ( numinstances, JIFlags.FLAG_NULL );
  obj.addInParamAsInt ( 0, JIFlags.FLAG_NULL );//private refs = 0
  if ( logger.isInfoEnabled () )
  {
    debug_delIpids ( IPID, numinstances );
    logger.info ( "releaseRef: Releasing numinstances {} references of IPID: {} session: {}", new Object[] { numinstances, IPID, getSessionIdentifier () } );
  }
  this.stub2.addRef_ReleaseRef ( obj );
}
origin: org.kohsuke.jinterop/j-interop

private void releaseRefs(JIArray arrayOfStructs, boolean fromDestroy) throws JIException
{
  if (JISystem.getLogger().isLoggable(Level.INFO))
  {
    JISystem.getLogger().info("In releaseRefs for session : " + getSessionIdentifier() + " , array length is: " + (short)(((Object[])arrayOfStructs.getArrayInstance()).length));
  }
  JICallBuilder obj = new JICallBuilder(true);
  obj.setOpnum(2);//release
  //length
  obj.addInParamAsShort((short)(((Object[])arrayOfStructs.getArrayInstance()).length),JIFlags.FLAG_NULL);
  obj.addInParamAsArray(arrayOfStructs,JIFlags.FLAG_NULL);
  obj.fromDestroySession = fromDestroy;
  stub2.addRef_ReleaseRef(obj);
  //ignore the results
}
origin: org.jinterop/j-interop

private void releaseRefs(JIArray arrayOfStructs, boolean fromDestroy) throws JIException
{
  if (JISystem.getLogger().isLoggable(Level.INFO))
  {
    JISystem.getLogger().info("In releaseRefs for session : " + getSessionIdentifier() + " , array length is: " + (short)(((Object[])arrayOfStructs.getArrayInstance()).length));
  }
  
  JICallBuilder obj = new JICallBuilder(true);
  obj.setOpnum(2);//release
  //length
  obj.addInParamAsShort((short)(((Object[])arrayOfStructs.getArrayInstance()).length),JIFlags.FLAG_NULL);
  obj.addInParamAsArray(arrayOfStructs,JIFlags.FLAG_NULL);
  obj.fromDestroySession = fromDestroy;
  stub.addRef_ReleaseRef(obj);
  
  //ignore the results
}
 
origin: org.openscada.jinterop/org.openscada.jinterop.core

@Override
public void release () throws JIException
{
  checkLocal ();
  final JICallBuilder obj = new JICallBuilder ( true );
  obj.setParentIpid ( this.ptr.getIPID () );
  obj.setOpnum ( 2 );//release
  //length
  obj.addInParamAsShort ( (short)1, JIFlags.FLAG_NULL );
  //ipid to addfref on
  final JIArray array = new JIArray ( new rpc.core.UUID[] { new rpc.core.UUID ( this.ptr.getIPID () ) }, true );
  obj.addInParamAsArray ( array, JIFlags.FLAG_NULL );
  //TODO requesting 5 for now, will later build caching mechnaism to exhaust 5 refs first before asking for more
  // same with release.
  obj.addInParamAsInt ( 5, JIFlags.FLAG_NULL );
  obj.addInParamAsInt ( 0, JIFlags.FLAG_NULL );//private refs = 0
  if ( logger.isInfoEnabled () )
  {
    logger.info ( "RELEASE called directly ! removing 5 references for " + this.ptr.getIPID () + " session: " + this.session.getSessionIdentifier () );
    JISession.debug_delIpids ( this.ptr.getIPID (), 5 );
  }
  this.session.getStub2 ().addRef_ReleaseRef ( obj );
}
origin: org.kohsuke.jinterop/j-interop

public void release() throws JIException
{
  checkLocal();
  JICallBuilder obj = new JICallBuilder(true);
  obj.setParentIpid(ptr.getIPID());
  obj.setOpnum(2);//release
  //length
  obj.addInParamAsShort((short)1,JIFlags.FLAG_NULL);
  //ipid to addfref on
  JIArray array = new JIArray(new rpc.core.UUID[]{new rpc.core.UUID(ptr.getIPID())},true);
  obj.addInParamAsArray(array,JIFlags.FLAG_NULL);
  //TODO requesting 5 for now, will later build caching mechnaism to exhaust 5 refs first before asking for more
  // same with release.
  obj.addInParamAsInt(5,JIFlags.FLAG_NULL);
  obj.addInParamAsInt(0,JIFlags.FLAG_NULL);//private refs = 0
  if (JISystem.getLogger().isLoggable(Level.INFO))
  {
    JISystem.getLogger().warning("RELEASE called directly ! removing 5 references for " + ptr.getIPID()+ " session: " + session.getSessionIdentifier());
    JISession.debug_delIpids(ptr.getIPID(), 5);
  }
  session.getStub2().addRef_ReleaseRef(obj);
}
org.jinterop.dcom.coreJISessiongetSessionIdentifier

Javadoc

Returns a unique identifier for this session.

Popular methods of JISession

  • createSession
    Creates a new session using credentials of the sessionparameter. The new session is not yet attached
  • setGlobalSocketTimeout
    Sets the timeout for all sockets opened to (not fro) the COM server for this session. Default value
  • destroySession
    Used to destroy the session, this release all references of the COM server and it's interfaces. It s
  • useSessionSecurity
    Sets the use of NTLM2 Session Security. Framework will use NTLM Packet Level Privacy and Sign\Seal
  • <init>
  • addToSession
  • debug_addIpids
  • debug_delIpids
  • equals
  • getDomain
    Gets the domain of the user associated with this session.
  • getGlobalSocketTimeout
    Returns the global timeout applied to all sockets opened from this session to COM Server.
  • getLocalHost
  • getGlobalSocketTimeout,
  • getLocalHost,
  • getLocalhostAddressAsIPString,
  • getLocalhostAddressAsIPbytes,
  • getLocalhostCanonicalAddressAsString,
  • getPassword,
  • getStub,
  • getTargetServer,
  • getUnreferencedHandler

Popular in Java

  • Reading from database using SQL prepared statement
  • getContentResolver (Context)
  • startActivity (Activity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • Kernel (java.awt.image)
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now