com.sun.corba.se.spi.legacy.connection.LegacyServerSocketEndPointInfo Java Examples

The following examples show how to use com.sun.corba.se.spi.legacy.connection.LegacyServerSocketEndPointInfo. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: LegacyServerSocketManagerImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public synchronized LegacyServerSocketEndPointInfo legacyGetEndpoint(
    String name)
{
    Iterator iterator = getAcceptorIterator();
    while (iterator.hasNext()) {
        LegacyServerSocketEndPointInfo endPoint = cast(iterator.next());
        if (endPoint != null && name.equals(endPoint.getName())) {
            return endPoint;
        }
    }
    throw new INTERNAL("No acceptor for: " + name);
}
 
Example #2
Source File: SocketOrChannelAcceptorImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public String getName()
{
    // Kluge alert:
    // Work and Legacy both define getName.
    // Try to make this behave best for most cases.
    String result =
        name.equals(LegacyServerSocketEndPointInfo.NO_NAME) ?
        this.toString() : name;
    return result;
}
 
Example #3
Source File: RepositoryImpl.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
public int registerServer(ServerDef serverDef)
    throws ServerAlreadyRegistered, BadServerDefinition
{
    // verify that the entry is valid
    LegacyServerSocketEndPointInfo endpoint =
        orb.getLegacyServerSocketManager()
            .legacyGetEndpoint(LegacyServerSocketEndPointInfo.BOOT_NAMING);
    int initSvcPort = ((SocketOrChannelAcceptor)endpoint)
        .getServerSocket().getLocalPort();
    ServerTableEntry entry = new ServerTableEntry( wrapper,
        illegalServerId, serverDef, (int) initSvcPort, "", true, debug );

    switch (entry.verify()) {
    case ServerMain.OK:
        break;
    case ServerMain.MAIN_CLASS_NOT_FOUND:
        throw new BadServerDefinition("main class not found.");
    case ServerMain.NO_MAIN_METHOD:
        throw new BadServerDefinition("no main method found.");
    case ServerMain.APPLICATION_ERROR:
        throw new BadServerDefinition("server application error.");
    default:
        throw new BadServerDefinition("unknown Exception.");
    }

    return registerServer(serverDef, illegalServerId);
}
 
Example #4
Source File: EndPointInfoImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public EndPointInfoImpl(String type, int port, String hostname) {
    this.type = type;
    this.port = port;
    this.hostname = hostname;
    this.locatorPort = -1;
    this.name = LegacyServerSocketEndPointInfo.NO_NAME;
}
 
Example #5
Source File: LegacyServerSocketManagerImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public synchronized LegacyServerSocketEndPointInfo legacyGetEndpoint(
    String name)
{
    Iterator iterator = getAcceptorIterator();
    while (iterator.hasNext()) {
        LegacyServerSocketEndPointInfo endPoint = cast(iterator.next());
        if (endPoint != null && name.equals(endPoint.getName())) {
            return endPoint;
        }
    }
    throw new INTERNAL("No acceptor for: " + name);
}
 
Example #6
Source File: SocketOrChannelAcceptorImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public SocketOrChannelAcceptorImpl(ORB orb)
{
    this.orb = orb;
    wrapper = ORBUtilSystemException.get( orb,
        CORBALogDomains.RPC_TRANSPORT ) ;

    setWork(this);
    initialized = false;

    // BEGIN Legacy support.
    this.hostname = orb.getORBData().getORBServerHost();
    this.name = LegacyServerSocketEndPointInfo.NO_NAME;
    this.locatorPort = -1;
    // END Legacy support.
}
 
Example #7
Source File: SocketOrChannelAcceptorImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public SocketOrChannelAcceptorImpl(ORB orb)
{
    this.orb = orb;
    wrapper = ORBUtilSystemException.get( orb,
        CORBALogDomains.RPC_TRANSPORT ) ;

    setWork(this);
    initialized = false;

    // BEGIN Legacy support.
    this.hostname = orb.getORBData().getORBServerHost();
    this.name = LegacyServerSocketEndPointInfo.NO_NAME;
    this.locatorPort = -1;
    // END Legacy support.
}
 
Example #8
Source File: LegacyServerSocketManagerImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public boolean legacyIsLocalServerPort(int port)
{
    Iterator iterator = getAcceptorIterator();
    while (iterator.hasNext()) {
        LegacyServerSocketEndPointInfo endPoint = cast(iterator.next());
        if (endPoint != null && endPoint.getPort() == port) {
            return true;
        }
    }
    return false;
}
 
Example #9
Source File: LegacyServerSocketManagerImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private LegacyServerSocketEndPointInfo cast(Object o)
{
    if (o instanceof LegacyServerSocketEndPointInfo) {
        return (LegacyServerSocketEndPointInfo) o;
    }
    return null;
}
 
Example #10
Source File: LegacyServerSocketManagerImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private LegacyServerSocketEndPointInfo cast(Object o)
{
    if (o instanceof LegacyServerSocketEndPointInfo) {
        return (LegacyServerSocketEndPointInfo) o;
    }
    return null;
}
 
Example #11
Source File: SocketOrChannelAcceptorImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public SocketOrChannelAcceptorImpl(ORB orb)
{
    this.orb = orb;
    wrapper = ORBUtilSystemException.get( orb,
        CORBALogDomains.RPC_TRANSPORT ) ;

    setWork(this);
    initialized = false;

    // BEGIN Legacy support.
    this.hostname = orb.getORBData().getORBServerHost();
    this.name = LegacyServerSocketEndPointInfo.NO_NAME;
    this.locatorPort = -1;
    // END Legacy support.
}
 
Example #12
Source File: SocketOrChannelAcceptorImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public String getName()
{
    // Kluge alert:
    // Work and Legacy both define getName.
    // Try to make this behave best for most cases.
    String result =
        name.equals(LegacyServerSocketEndPointInfo.NO_NAME) ?
        this.toString() : name;
    return result;
}
 
Example #13
Source File: SocketOrChannelAcceptorImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public SocketOrChannelAcceptorImpl(ORB orb)
{
    this.orb = orb;
    wrapper = ORBUtilSystemException.get( orb,
        CORBALogDomains.RPC_TRANSPORT ) ;

    setWork(this);
    initialized = false;

    // BEGIN Legacy support.
    this.hostname = orb.getORBData().getORBServerHost();
    this.name = LegacyServerSocketEndPointInfo.NO_NAME;
    this.locatorPort = -1;
    // END Legacy support.
}
 
Example #14
Source File: RepositoryImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public int registerServer(ServerDef serverDef)
    throws ServerAlreadyRegistered, BadServerDefinition
{
    // verify that the entry is valid
    LegacyServerSocketEndPointInfo endpoint =
        orb.getLegacyServerSocketManager()
            .legacyGetEndpoint(LegacyServerSocketEndPointInfo.BOOT_NAMING);
    int initSvcPort = ((SocketOrChannelAcceptor)endpoint)
        .getServerSocket().getLocalPort();
    ServerTableEntry entry = new ServerTableEntry( wrapper,
        illegalServerId, serverDef, (int) initSvcPort, "", true, debug );

    switch (entry.verify()) {
    case ServerMain.OK:
        break;
    case ServerMain.MAIN_CLASS_NOT_FOUND:
        throw new BadServerDefinition("main class not found.");
    case ServerMain.NO_MAIN_METHOD:
        throw new BadServerDefinition("no main method found.");
    case ServerMain.APPLICATION_ERROR:
        throw new BadServerDefinition("server application error.");
    default:
        throw new BadServerDefinition("unknown Exception.");
    }

    return registerServer(serverDef, illegalServerId);
}
 
Example #15
Source File: LegacyServerSocketManagerImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public synchronized LegacyServerSocketEndPointInfo legacyGetEndpoint(
    String name)
{
    Iterator iterator = getAcceptorIterator();
    while (iterator.hasNext()) {
        LegacyServerSocketEndPointInfo endPoint = cast(iterator.next());
        if (endPoint != null && name.equals(endPoint.getName())) {
            return endPoint;
        }
    }
    throw new INTERNAL("No acceptor for: " + name);
}
 
Example #16
Source File: LegacyServerSocketManagerImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public boolean legacyIsLocalServerPort(int port)
{
    Iterator iterator = getAcceptorIterator();
    while (iterator.hasNext()) {
        LegacyServerSocketEndPointInfo endPoint = cast(iterator.next());
        if (endPoint != null && endPoint.getPort() == port) {
            return true;
        }
    }
    return false;
}
 
Example #17
Source File: RepositoryImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public int registerServer(ServerDef serverDef)
    throws ServerAlreadyRegistered, BadServerDefinition
{
    // verify that the entry is valid
    LegacyServerSocketEndPointInfo endpoint =
        orb.getLegacyServerSocketManager()
            .legacyGetEndpoint(LegacyServerSocketEndPointInfo.BOOT_NAMING);
    int initSvcPort = ((SocketOrChannelAcceptor)endpoint)
        .getServerSocket().getLocalPort();
    ServerTableEntry entry = new ServerTableEntry( wrapper,
        illegalServerId, serverDef, (int) initSvcPort, "", true, debug );

    switch (entry.verify()) {
    case ServerMain.OK:
        break;
    case ServerMain.MAIN_CLASS_NOT_FOUND:
        throw new BadServerDefinition("main class not found.");
    case ServerMain.NO_MAIN_METHOD:
        throw new BadServerDefinition("no main method found.");
    case ServerMain.APPLICATION_ERROR:
        throw new BadServerDefinition("server application error.");
    default:
        throw new BadServerDefinition("unknown Exception.");
    }

    return registerServer(serverDef, illegalServerId);
}
 
Example #18
Source File: RepositoryImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public int registerServer(ServerDef serverDef)
    throws ServerAlreadyRegistered, BadServerDefinition
{
    // verify that the entry is valid
    LegacyServerSocketEndPointInfo endpoint =
        orb.getLegacyServerSocketManager()
            .legacyGetEndpoint(LegacyServerSocketEndPointInfo.BOOT_NAMING);
    int initSvcPort = ((SocketOrChannelAcceptor)endpoint)
        .getServerSocket().getLocalPort();
    ServerTableEntry entry = new ServerTableEntry( wrapper,
        illegalServerId, serverDef, (int) initSvcPort, "", true, debug );

    switch (entry.verify()) {
    case ServerMain.OK:
        break;
    case ServerMain.MAIN_CLASS_NOT_FOUND:
        throw new BadServerDefinition("main class not found.");
    case ServerMain.NO_MAIN_METHOD:
        throw new BadServerDefinition("no main method found.");
    case ServerMain.APPLICATION_ERROR:
        throw new BadServerDefinition("server application error.");
    default:
        throw new BadServerDefinition("unknown Exception.");
    }

    return registerServer(serverDef, illegalServerId);
}
 
Example #19
Source File: SocketOrChannelAcceptorImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public SocketOrChannelAcceptorImpl(ORB orb)
{
    this.orb = orb;
    wrapper = ORBUtilSystemException.get( orb,
        CORBALogDomains.RPC_TRANSPORT ) ;

    setWork(this);
    initialized = false;

    // BEGIN Legacy support.
    this.hostname = orb.getORBData().getORBServerHost();
    this.name = LegacyServerSocketEndPointInfo.NO_NAME;
    this.locatorPort = -1;
    // END Legacy support.
}
 
Example #20
Source File: SocketOrChannelAcceptorImpl.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
public SocketOrChannelAcceptorImpl(ORB orb)
{
    this.orb = orb;
    wrapper = ORBUtilSystemException.get( orb,
        CORBALogDomains.RPC_TRANSPORT ) ;

    setWork(this);
    initialized = false;

    // BEGIN Legacy support.
    this.hostname = orb.getORBData().getORBServerHost();
    this.name = LegacyServerSocketEndPointInfo.NO_NAME;
    this.locatorPort = -1;
    // END Legacy support.
}
 
Example #21
Source File: EndPointInfoImpl.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
public EndPointInfoImpl(String type, int port, String hostname) {
    this.type = type;
    this.port = port;
    this.hostname = hostname;
    this.locatorPort = -1;
    this.name = LegacyServerSocketEndPointInfo.NO_NAME;
}
 
Example #22
Source File: LegacyServerSocketManagerImpl.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
private LegacyServerSocketEndPointInfo cast(Object o)
{
    if (o instanceof LegacyServerSocketEndPointInfo) {
        return (LegacyServerSocketEndPointInfo) o;
    }
    return null;
}
 
Example #23
Source File: LegacyServerSocketManagerImpl.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
private int legacyGetServerPort (String socketType, boolean isPersistent)
{
    Iterator endpoints = getAcceptorIterator();
    while (endpoints.hasNext()) {
        LegacyServerSocketEndPointInfo ep = cast(endpoints.next());
        if (ep != null && ep.getType().equals(socketType)) {
            if (isPersistent) {
                return ep.getLocatorPort();
            } else {
                return ep.getPort();
            }
        }
    }
    return -1;
}
 
Example #24
Source File: LegacyServerSocketManagerImpl.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
public synchronized LegacyServerSocketEndPointInfo legacyGetEndpoint(
    String name)
{
    Iterator iterator = getAcceptorIterator();
    while (iterator.hasNext()) {
        LegacyServerSocketEndPointInfo endPoint = cast(iterator.next());
        if (endPoint != null && name.equals(endPoint.getName())) {
            return endPoint;
        }
    }
    throw new INTERNAL("No acceptor for: " + name);
}
 
Example #25
Source File: LegacyServerSocketManagerImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
private LegacyServerSocketEndPointInfo cast(Object o)
{
    if (o instanceof LegacyServerSocketEndPointInfo) {
        return (LegacyServerSocketEndPointInfo) o;
    }
    return null;
}
 
Example #26
Source File: SocketOrChannelAcceptorImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public SocketOrChannelAcceptorImpl(ORB orb)
{
    this.orb = orb;
    wrapper = ORBUtilSystemException.get( orb,
        CORBALogDomains.RPC_TRANSPORT ) ;

    setWork(this);
    initialized = false;

    // BEGIN Legacy support.
    this.hostname = orb.getORBData().getORBServerHost();
    this.name = LegacyServerSocketEndPointInfo.NO_NAME;
    this.locatorPort = -1;
    // END Legacy support.
}
 
Example #27
Source File: EndPointInfoImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public EndPointInfoImpl(String type, int port, String hostname) {
    this.type = type;
    this.port = port;
    this.hostname = hostname;
    this.locatorPort = -1;
    this.name = LegacyServerSocketEndPointInfo.NO_NAME;
}
 
Example #28
Source File: LegacyServerSocketManagerImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
private LegacyServerSocketEndPointInfo cast(Object o)
{
    if (o instanceof LegacyServerSocketEndPointInfo) {
        return (LegacyServerSocketEndPointInfo) o;
    }
    return null;
}
 
Example #29
Source File: LegacyServerSocketManagerImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
private int legacyGetServerPort (String socketType, boolean isPersistent)
{
    Iterator endpoints = getAcceptorIterator();
    while (endpoints.hasNext()) {
        LegacyServerSocketEndPointInfo ep = cast(endpoints.next());
        if (ep != null && ep.getType().equals(socketType)) {
            if (isPersistent) {
                return ep.getLocatorPort();
            } else {
                return ep.getPort();
            }
        }
    }
    return -1;
}
 
Example #30
Source File: LegacyServerSocketManagerImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
private LegacyServerSocketEndPointInfo cast(Object o)
{
    if (o instanceof LegacyServerSocketEndPointInfo) {
        return (LegacyServerSocketEndPointInfo) o;
    }
    return null;
}