/** * {@inheritDoc} */ @Override public boolean equals(Object o) { if (o instanceof RemoteFrameworkConnectionInfo) { RemoteFrameworkConnectionInfo other = (RemoteFrameworkConnectionInfo) o; if (!getHost().equals(other.getHost())) { return false; } if (getPort() != other.getPort()) { return false; } if (getUseSSL() != other.getUseSSL()) { return false; } if (!getTrustManagers().equals(other.getTrustManagers())) { return false; } if (!getKey().equals(other.getKey())) { return false; } if (getTimeout() != other.getTimeout()) { return false; } return true; } return false; }
/** * {@inheritDoc} */ @Override public boolean equals(Object o) { if (o instanceof RemoteFrameworkConnectionInfo) { RemoteFrameworkConnectionInfo other = (RemoteFrameworkConnectionInfo) o; if (!getHost().equals(other.getHost())) { return false; } if (getPort() != other.getPort()) { return false; } if (getUseSSL() != other.getUseSSL()) { return false; } if (!getTrustManagers().equals(other.getTrustManagers())) { return false; } if (!getKey().equals(other.getKey())) { return false; } if (getTimeout() != other.getTimeout()) { return false; } return true; } return false; }
try { connection.writeObject(CurrentLocale.get()); connection.writeObject(frameworkConnectionInfo.getKey()); connection.writeObject(new HelloRequest(HelloRequest.CONNECTOR_INFO)); response = (HelloResponse) connection.readObject();
connection = new RemoteFrameworkConnection(connectionInfo); connection.writeObject(CurrentLocale.get()); connection.writeObject(connectionInfo.getKey());
connection = new RemoteFrameworkConnection(connectionInfo); connection.writeObject(CurrentLocale.get()); connection.writeObject(connectionInfo.getKey());
try { connection.writeObject(CurrentLocale.get()); connection.writeObject(frameworkConnectionInfo.getKey()); connection.writeObject(new HelloRequest(HelloRequest.CONNECTOR_INFO)); response = (HelloResponse) connection.readObject();
connection.writeObject(connectionInfo.getKey());
public Map<String, Object> getServerInfo() throws RuntimeException { try (RemoteFrameworkConnection connection = new RemoteFrameworkConnection(frameworkConnectionInfo)) { connection.writeObject(CurrentLocale.get()); connection.writeObject(frameworkConnectionInfo.getKey()); connection.writeObject(new HelloRequest(HelloRequest.SERVER_INFO)); HelloResponse response = (HelloResponse) connection.readObject(); if (response.getException() instanceof ConnectorException) { throw (ConnectorException) response.getException(); } else if (response.getException() != null) { throw ConnectorException.wrap(response.getException()); } return response.getServerInfo(); } }
public Map<String, Object> getServerInfo() throws RuntimeException { try (RemoteFrameworkConnection connection = new RemoteFrameworkConnection(frameworkConnectionInfo)) { connection.writeObject(CurrentLocale.get()); connection.writeObject(frameworkConnectionInfo.getKey()); connection.writeObject(new HelloRequest(HelloRequest.SERVER_INFO)); HelloResponse response = (HelloResponse) connection.readObject(); if (response.getException() instanceof ConnectorException) { throw (ConnectorException) response.getException(); } else if (response.getException() != null) { throw ConnectorException.wrap(response.getException()); } return response.getServerInfo(); } }
public List<ConnectorKey> getConnectorKeys() throws RuntimeException { try (RemoteFrameworkConnection connection = new RemoteFrameworkConnection(frameworkConnectionInfo)) { connection.writeObject(CurrentLocale.get()); connection.writeObject(frameworkConnectionInfo.getKey()); connection.writeObject(new HelloRequest(HelloRequest.CONNECTOR_KEY_LIST)); HelloResponse response = (HelloResponse) connection.readObject(); if (response.getException() instanceof ConnectorException) { throw (ConnectorException) response.getException(); } else if (response.getException() != null) { throw ConnectorException.wrap(response.getException()); } return response.getConnectorKeys(); } }
public List<ConnectorKey> getConnectorKeys() throws RuntimeException { try (RemoteFrameworkConnection connection = new RemoteFrameworkConnection(frameworkConnectionInfo)) { connection.writeObject(CurrentLocale.get()); connection.writeObject(frameworkConnectionInfo.getKey()); connection.writeObject(new HelloRequest(HelloRequest.CONNECTOR_KEY_LIST)); HelloResponse response = (HelloResponse) connection.readObject(); if (response.getException() instanceof ConnectorException) { throw (ConnectorException) response.getException(); } else if (response.getException() != null) { throw ConnectorException.wrap(response.getException()); } return response.getConnectorKeys(); } }
public RemoteConnectorInfoManagerImpl(RemoteFrameworkConnectionInfo info) throws RuntimeException { RemoteFrameworkConnection connection = new RemoteFrameworkConnection(info); try { connection.writeObject(CurrentLocale.get()); connection.writeObject(info.getKey()); connection.writeObject(new HelloRequest()); HelloResponse response = (HelloResponse)connection.readObject(); if ( response.getException() != null ) { throw ConnectorException.wrap(response.getException()); } List<RemoteConnectorInfoImpl> remoteInfos = response.getConnectorInfos(); //populate transient fields not serialized for (RemoteConnectorInfoImpl remoteInfo : remoteInfos ) { remoteInfo.setRemoteConnectionInfo(info); } _connectorInfo = CollectionUtil.<ConnectorInfo>newReadOnlyList(remoteInfos); } finally { connection.close(); } }