edu.sdsc.inca
Class ManagerClient

java.lang.Object
  extended byjava.lang.Thread
      extended byedu.sdsc.inca.Component
          extended byedu.sdsc.inca.Client
              extended byedu.sdsc.inca.ManagerClient
All Implemented Interfaces:
java.lang.Runnable

public class ManagerClient
extends Client

Created by IntelliJ IDEA.

Author:
Shava Smallen <ssmallen@sdsc.edu>

Field Summary
 
Fields inherited from class edu.sdsc.inca.Client
CLIENT_OPTS, host, port, reader, socket, writer
 
Fields inherited from class edu.sdsc.inca.Component
authenticate, cert, certPath, COMPONENT_OPTS, key, keyPath, logFile, password, trusted, trustedPath
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ManagerClient()
           
 
Method Summary
 ProtocolReader getReader()
          Return the reader connected to the remote reporter manager.
 ProtocolWriter getWriter()
          Return the writer connected to the remote reporter manager.
 void sendPackage(java.lang.String filename, java.lang.String installPath, java.lang.String name, byte[] packageContent, java.lang.String permissions, java.lang.String dependencies, java.lang.String version)
          Send the provided package information and content to the manager.
 void sendProxyRenewInfo(java.lang.String dn, java.lang.String hostname, int lifetime, java.lang.String password, int port, java.lang.String username)
          Send the provided proxy renewal information to the manager.
 void sendSuite(java.lang.String resource, edu.sdsc.inca.dataModel.suite.SuiteDocument suite)
          Send the specified suite document to the remote reporter manager.
 void setReader(ProtocolReader reader)
          Set the reader connected to the remote reporter manager.
 void setWriter(ProtocolWriter writer)
          Set the writer connected to the remote reporter manager.
 
Methods inherited from class edu.sdsc.inca.Client
close, commandGetLog, commandLogConfig, commandPing, connect, dialog, finalize, getHost, getPort, getUri, isConnected, main, read, setConfiguration, setHost, setPort, setServer, telnetDialog, write
 
Methods inherited from class edu.sdsc.inca.Component
addTrustedCert, configComponent, createSocket, getAuthenticate, getCertificate, getCertificatePath, getKey, getKeyPath, getLogFile, getPassword, getTrustedCertificates, getTrustedPath, openResourceStream, readCredentials, readVersion, setAuthenticate, setCertificatePath, setKeyPath, setLogFile, setPassword, setTrustedPath
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, run, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ManagerClient

public ManagerClient()
Method Detail

getReader

public ProtocolReader getReader()
Return the reader connected to the remote reporter manager.

Returns:
The reader for the manager client.

getWriter

public ProtocolWriter getWriter()
Return the writer connected to the remote reporter manager.

Returns:
The writer for the manager client.

sendPackage

public void sendPackage(java.lang.String filename,
                        java.lang.String installPath,
                        java.lang.String name,
                        byte[] packageContent,
                        java.lang.String permissions,
                        java.lang.String dependencies,
                        java.lang.String version)
                 throws java.io.IOException,
                        ProtocolException
Send the provided package information and content to the manager.

Parameters:
filename - The name of the file to store this package as.
installPath - The path relative to the package cache directory to store this package at.
name - The repository name for this package.
packageContent - The package content
permissions - The permissions to set on the package once installed or null to use default permissions.
dependencies - The dependencies (space delimited) on this package or null if no dependencies.
version - The version of this package.
Throws:
java.io.IOException
ProtocolException

sendProxyRenewInfo

public void sendProxyRenewInfo(java.lang.String dn,
                               java.lang.String hostname,
                               int lifetime,
                               java.lang.String password,
                               int port,
                               java.lang.String username)
                        throws java.io.IOException,
                               ProtocolException
Send the provided proxy renewal information to the manager.

Parameters:
dn - The DN of the MyProxy server (use null if standard DN)
hostname - The host where the MyProxy server is running on
lifetime - The lifetime of the new proxy credential
password - The password to authenticate to the MyProxy server [default: 24 hours]
port - The port where the MyProxy server is running on [default: 7512]
username - The username the proxy credential is stored under
Throws:
java.io.IOException
ProtocolException

sendSuite

public void sendSuite(java.lang.String resource,
                      edu.sdsc.inca.dataModel.suite.SuiteDocument suite)
               throws java.io.IOException,
                      ProtocolException
Send the specified suite document to the remote reporter manager.

Parameters:
resource - The name of the resource the suite is being sent to.
suite - A suite to send to the reporter manager.
Throws:
java.io.IOException
ProtocolException

setReader

public void setReader(ProtocolReader reader)
Set the reader connected to the remote reporter manager.

Parameters:
reader - The reader for the manager client

setWriter

public void setWriter(ProtocolWriter writer)
Set the writer connected to the remote reporter manager.

Parameters:
writer - The reader for the manager client