public class RestService extends Service implements csbase.remote.RestServiceInterface
| Modifier | Constructor and Description |
|---|---|
protected |
RestService() |
| Modifier and Type | Method and Description |
|---|---|
static void |
createService()
Constrói a instância do serviço.
|
String |
createToken(String subject,
Map<String,Object> attributes,
Date expirationDate,
Date issuedDate) |
String |
getExternalURL() |
static RestService |
getInstance()
Retorna a única instancia do servico
|
protected boolean |
has2Update(Object arg,
Object event) |
protected void |
initService()
Método abstrato de inicialização do serviço.
|
void |
logInfoMessage(String msg) |
void |
logSevereMessage(String msg,
Throwable t) |
String |
parserToken(String token,
Map<String,Object> outAttributes) |
SecretKey |
readKeyFromFile(String privateKeyFileName)
Recupera a chave privada contida no arquivo fornecido.
|
protected void |
shutdownService()
Método abstrato de término do serviço
|
getBooleanProperty, getDefaultLocale, getDoubleProperty, getExternalPropertyFile, getFormattedString, getFormattedString, getInitializationDependencies, getInstance, getIntProperty, getKey, getLongProperty, getName, getOptionalString, getOptionalString, getOSPropertyPath, getSenderName, getServices, getString, getString, getStringListProperty, getStringProperty, getSystemId, getThreadLocale, getUser, getUserPermission, hasProperty, incrCounter, isActive, isEnabled, isInternalServerRequest, isLoggingNotifications, isPropertyNull, logNotification, setEnabled, setKey, setSystemId, setUserId, setUserLocalehandleException, handleFatalErroraddObserver, countObservers, deleteObserver, deleteObserver, deleteObservers, has2update, notifyObserversprotected RestService()
throws ServerException
ServerExceptionprotected void initService()
throws ServerException
initService in class ServiceServerException - em caso de falhaprotected void shutdownService()
throws ServerException
shutdownService in class ServiceServerException - em caso de falha.protected boolean has2Update(Object arg, Object event)
has2Update in class csbase.remote.RemoteObjectObservablepublic static void createService()
throws ServerException
ServerException - caso ocorra falha na inicializaçãopublic static RestService getInstance()
public String createToken(String subject, Map<String,Object> attributes, Date expirationDate, Date issuedDate)
createToken in interface csbase.remote.RestServiceInterfacepublic String parserToken(String token, Map<String,Object> outAttributes) throws csbase.exception.ParseException
parserToken in interface csbase.remote.RestServiceInterfacecsbase.exception.ParseExceptionpublic String getExternalURL()
getExternalURL in interface csbase.remote.RestServiceInterfacepublic void logSevereMessage(String msg, Throwable t)
logSevereMessage in interface csbase.remote.RestServiceInterfacepublic void logInfoMessage(String msg)
logInfoMessage in interface csbase.remote.RestServiceInterfacepublic SecretKey readKeyFromFile(String privateKeyFileName) throws IOException, InvalidKeySpecException, NoSuchAlgorithmException
privateKeyFileName - o path para o arquivo.IOExceptionInvalidKeySpecExceptionNoSuchAlgorithmExceptionCopyright © 2016. All rights reserved.